Error handling bugfix: pass #1
This commit is contained in:
Vendored
+5
-1
@@ -14,6 +14,10 @@ export default async function grabConfig() {
|
||||
return config;
|
||||
}
|
||||
catch (error) {
|
||||
return undefined;
|
||||
// A config that fails to load (syntax error, bad export) must not be
|
||||
// silently replaced by defaults — the app would run with the wrong
|
||||
// configuration and nothing would explain why.
|
||||
const { CONFIG_FILE } = grabDirNames();
|
||||
exitWithError(`Failed to load config file \`${CONFIG_FILE}\`: ${error?.message || error}`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user