diff --git a/src/config-parser.js b/src/config-parser.js index 4de4cfe..b5da032 100644 --- a/src/config-parser.js +++ b/src/config-parser.js @@ -23,12 +23,11 @@ class ConfigParser { validate() { if (!this.config) { - // Create the config file if it doesn't exist - fs.writeFile(this.staticSiteConfig.filePath, this.generateConfigFile(), (err) => { + core.info(`original raw configuration was invalid:\n${this.config}`) + core.info(`Generating a default configuration to start from...`) - // In case of a error throw err. - if (err) throw err; - }) + // Update the `config` property with a default configuration file + this.config = this.generateConfigFile() } }