gulp-run icon indicating copy to clipboard operation
gulp-run copied to clipboard

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

Open ghost opened this issue 9 years ago • 3 comments

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.

ghost avatar Sep 07 '15 19:09 ghost

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.

m19c avatar Sep 08 '16 17:09 m19c

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.

ajeffrey avatar Jan 13 '17 14:01 ajeffrey

Yep, for sure. Appreciate it!

m19c avatar Jan 13 '17 15:01 m19c