From 5791b496538d726807490a738e4c397f8080e62c Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Sat, 30 Jul 2016 18:57:01 -0700 Subject: [PATCH] error: prevent ansi escapes for colors in stdout --- lib/error.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/error.js b/lib/error.js index acaab62..52d5777 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) { @@ -21,5 +22,5 @@ export function handleError (err) { } export function error (err) { - console.error(`> \u001b[31mError!\u001b[39m ${err}`); + console.error(`> ${chalk.red('Error!')} ${err}`); }