mirror of
https://github.com/actions/configure-pages.git
synced 2025-12-08 16:16:09 +00:00
Put default config file content directly into memory
This commit is contained in:
@@ -23,12 +23,11 @@ class ConfigParser {
|
|||||||
|
|
||||||
validate() {
|
validate() {
|
||||||
if (!this.config) {
|
if (!this.config) {
|
||||||
// Create the config file if it doesn't exist
|
core.info(`original raw configuration was invalid:\n${this.config}`)
|
||||||
fs.writeFile(this.staticSiteConfig.filePath, this.generateConfigFile(), (err) => {
|
core.info(`Generating a default configuration to start from...`)
|
||||||
|
|
||||||
// In case of a error throw err.
|
// Update the `config` property with a default configuration file
|
||||||
if (err) throw err;
|
this.config = this.generateConfigFile()
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user