m19c / gulp-run

Pipe to shell commands in gulp
ISC License
151 stars 25 forks source link

Is there a way to preserve terminal color output when running a child process? #40

Open ghost opened 9 years ago

ghost commented 9 years ago

First off, thank you for the great plugin!

I'm running a child process which has some terminal colors when run on its own, but those colors are lost when running under gulp-run and everything appears as the basic text color.

Is there a way to preserve the colors while running under a child process? I'm running on OS X.

m19c commented 8 years ago

I guess the problem is not the plugin. Try --ansi. In some cases command line programs will prevent a colorized output when not run through a terminal.

ajeffrey commented 7 years ago

hi, I looked into this and it turns out that the color will come through if you change the spawn() calls to include {stdin: 'inherit'}, but that breaks some other code. Might play around with it at the weekend if you'd be happy to accept a PR.

m19c commented 7 years ago

Yep, for sure. Appreciate it!