From 1e3b866c8b6b40752efc85ffc9d98930eb43cc09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?= Date: Sun, 5 Mar 2017 22:20:35 -0300 Subject: [PATCH] Use color red for error when the configuration file is not found. --- js/app.js | 6 +++--- js/utils.js | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/js/app.js b/js/app.js index f8825f7e..138fec70 100644 --- a/js/app.js +++ b/js/app.js @@ -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); } diff --git a/js/utils.js b/js/utils.js index 7f548afa..76eb2703 100644 --- a/js/utils.js +++ b/js/utils.js @@ -10,7 +10,8 @@ var colors = require("colors/safe"); var Utils = { colors: { - warn: colors.yellow + warn: colors.yellow, + error: colors.red } };