Skip to content

Commit

Permalink
fix(cli): validate config file version number (#413)
Browse files Browse the repository at this point in the history
* fix(cli): validate config file version number

* refactor(cli): move configuration file validation
  • Loading branch information
simonas-notcat authored Mar 9, 2021
1 parent 650d73c commit fb5668c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/cli/src/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ export const getConfig = (fileName: string): any => {
}

const config = yaml.parse(fs.readFileSync(fileName).toString())

if (config?.version != 1) {
console.log('Unsupported configuration file version:', config.version)
process.exit(1)
}
return config
}

Expand Down

0 comments on commit fb5668c

Please sign in to comment.