fix cant run without user_config.json
This commit is contained in:
@@ -528,9 +528,11 @@ class WTVShared {
|
|||||||
};
|
};
|
||||||
const logError = (msg, e) => {
|
const logError = (msg, e) => {
|
||||||
console.error(msg, e);
|
console.error(msg, e);
|
||||||
if (this.minisrv_config && this.minisrv_config.config.debug_flags && this.minisrv_config.config.debug_flags.debug) {
|
if (this.minisrv_config.config) {
|
||||||
|
if (this.minisrv_config.config.debug_flags && this.minisrv_config.config.debug_flags.debug) {
|
||||||
console.error(" * Notice: Using default configuration.");
|
console.error(" * Notice: Using default configuration.");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
log(" *** Reading global configuration...");
|
log(" *** Reading global configuration...");
|
||||||
@@ -544,7 +546,6 @@ class WTVShared {
|
|||||||
log(" *** Reading user configuration...");
|
log(" *** Reading user configuration...");
|
||||||
try {
|
try {
|
||||||
let minisrv_user_config = this.getUserConfig();
|
let minisrv_user_config = this.getUserConfig();
|
||||||
if (!minisrv_user_config) throw new Error("WARN: Could not read user_config.json");
|
|
||||||
minisrv_config = this.integrateConfig(minisrv_config, minisrv_user_config);
|
minisrv_config = this.integrateConfig(minisrv_config, minisrv_user_config);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logError("ERROR: Could not integrate user_config.json", e);
|
logError("ERROR: Could not integrate user_config.json", e);
|
||||||
|
|||||||
Reference in New Issue
Block a user