Skip to content

Commit

Permalink
fix: 🐛 error handling for config yaml's format
Browse files Browse the repository at this point in the history
  • Loading branch information
cestoliv committed May 29, 2023
1 parent eef0dec commit cd2aa2c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion core/scripts/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ try {
error(undefined, 'CONFIG', `Could not read config file: ${e}`, 'ERROR');
process.exit(1);
}
let configYaml = load(file);
let configYaml: unknown = {};
try {
configYaml = load(file);
} catch (e) {
error(undefined, 'CONFIG', `Could not parse config file: ${e}`, 'ERROR');
process.exit(1);
}
dotenv.config();

export const conf = (
Expand Down

0 comments on commit cd2aa2c

Please sign in to comment.