Skip to content

Commit

Permalink
fix(): use an environment variable to force colors instead of using t…
Browse files Browse the repository at this point in the history
…he --colors flag. (#1557)
  • Loading branch information
jthoms1 authored Oct 18, 2016
1 parent 5ee6657 commit cdbeef6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,12 @@ Cli.runWithNpmScripts = function runWithNpmScripts(argv, taskInstance, rawCliArg

Cli.runNpmHook = function runNpmHook(hook) {
var cmd = 'npm';
var args = ['run', hook, '--color'];
var args = ['run', hook];
var command = cmd + ' ' + args;

// Force colors for all spawned child processes
process.env['FORCE_COLOR'] = true;

var q = Q.defer();
var spawn = require('cross-spawn-async');

Expand Down

0 comments on commit cdbeef6

Please sign in to comment.