From 4bd702bf4547fe01c5effa4491a6f8ead06857d7 Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Sat, 30 Jul 2016 19:10:21 -0700 Subject: [PATCH] use chalk for stderr colors --- lib/error.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/error.js b/lib/error.js index acaab62..08ade63 100644 --- a/lib/error.js +++ b/lib/error.js @@ -1,4 +1,5 @@ import ms from 'ms'; +import chalk from 'chalk'; export function handleError (err) { if (403 === err.status) { @@ -20,6 +21,6 @@ export function handleError (err) { } } -export function error (err) { - console.error(`> \u001b[31mError!\u001b[39m ${err}`); +export function error (msg) { + console.error(`> ${chalk.red('Error')} ${msg}`); }