Browse Source

Merge pull request #96 from zeit/fix/colors-in-stderr-non-tty

Fix colors in stderr non tty
master
Tony Kovanen 9 years ago
committed by GitHub
parent
commit
3cee6daa9d
  1. 5
      lib/error.js

5
lib/error.js

@ -1,4 +1,5 @@
import ms from 'ms'; import ms from 'ms';
import chalk from 'chalk';
export function handleError (err) { export function handleError (err) {
if (403 === err.status) { if (403 === err.status) {
@ -20,6 +21,6 @@ export function handleError (err) {
} }
} }
export function error (err) { export function error (msg) {
console.error(`> \u001b[31mError!\u001b[39m ${err}`); console.error(`> ${chalk.red('Error')} ${msg}`);
} }

Loading…
Cancel
Save