Skip to content

Commit

Permalink
Preserve output colors
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcnunes committed Nov 25, 2015
1 parent f7dc74e commit 1dbdcda
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,16 @@ module.exports = function (options) {
procOptions = cloneObjWithoutProps(options.watch, ['path']);
}

// pipe all outputs and preserve colors
procOptions = procOptions || {};
procOptions.stdio = 'inherit';

/**
* start the child process
*/
function start() {
proc = spawn(procCommand, procArgs, procOptions);

proc.stdout.pipe(process.stdout);
proc.stderr.pipe(process.stderr);

var onClose = function (code) {
if (!restarting) {
process.exit(code);
Expand Down

0 comments on commit 1dbdcda

Please sign in to comment.