Merge branch 'colors-error' into check-wrong-configuration

This commit is contained in:
Rodrigo Ramírez Norambuena 2017-03-18 06:00:49 -03:00
commit 2c0ca78265
2 changed files with 5 additions and 4 deletions

View File

@ -68,11 +68,11 @@ var App = function() {
callback(config); callback(config);
} catch (e) { } catch (e) {
if (e.code == "ENOENT") { 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) { } 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 { } 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); callback(defaults);
} }

View File

@ -10,7 +10,8 @@ var colors = require("colors/safe");
var Utils = { var Utils = {
colors: { colors: {
warn: colors.yellow warn: colors.yellow,
error: colors.red
} }
}; };