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() {
|
||||
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()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user