mirror of
https://github.com/tomru/switchmon.git
synced 2026-03-03 06:27:23 +01:00
ignore missing config file, but throw other errors
This commit is contained in:
@@ -11,6 +11,9 @@ let config = Object.assign({}, defaults);
|
|||||||
try {
|
try {
|
||||||
config = Object.assign(config, require(configPath));
|
config = Object.assign(config, require(configPath));
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
|
if (err.code !== 'MODULE_NOT_FOUND') {
|
||||||
|
throw err;
|
||||||
|
}
|
||||||
// No config found in "${configPath}". Using defaults...
|
// No config found in "${configPath}". Using defaults...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user