mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
Merge pull request #785 from roramirez/colors-error
Use color red for error when the configuration file is not found.
This commit is contained in:
commit
c62082b924
@ -68,11 +68,11 @@ var App = function() {
|
||||
callback(config);
|
||||
} catch (e) {
|
||||
if (e.code == "ENOENT") {
|
||||
console.error("WARNING! Could not find config file. Please create one. Starting with default configuration.");
|
||||
console.error(Utils.colors.error("WARNING! Could not find config file. Please create one. Starting with default configuration."));
|
||||
} else if (e instanceof ReferenceError || e instanceof SyntaxError) {
|
||||
console.error("WARNING! Could not validate config file. Please correct syntax errors. Starting with default configuration.");
|
||||
console.error(Utils.colors.error("WARNING! Could not validate config file. Please correct syntax errors. Starting with default configuration."));
|
||||
} else {
|
||||
console.error("WARNING! Could not load config file. Starting with default configuration. Error found: " + e);
|
||||
console.error(Utils.colors.error("WARNING! Could not load config file. Starting with default configuration. Error found: " + e));
|
||||
}
|
||||
callback(defaults);
|
||||
}
|
||||
|
@ -10,7 +10,8 @@ var colors = require("colors/safe");
|
||||
|
||||
var Utils = {
|
||||
colors: {
|
||||
warn: colors.yellow
|
||||
warn: colors.yellow,
|
||||
error: colors.red
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user