m19c / gulp-run

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

Option to print command only if it has stderr #30

Open Jenselme opened 9 years ago

Jenselme commented 9 years ago

Hi,

Can you add an option to print the command only if it has an stderr (with the stderr of course)? I am compelled to run a command that takes a long file list as argument and I would like to avoid to see this multiple line command. Verbosity:0 doesn't do the trick since I would like to see the error output if it has one.

kcaran commented 7 years ago

I would love this as well. I could see it implemented in two ways:

1) Alter 'silent' to only print stderr and not the command

2) Use verbosity : 0 to only print stderr and not the command, and -1 for completely silent.

I think option 1 makes the most sense. Without fully reading the docs, I used silent : true first and was surprised when the command displayed.

m19c commented 7 years ago

Hmmm... maybe a bunch of constants makes the verbosity more comfortable.

e.g.

VERBOSITY_ALL = 3
VERBOSITY_BUFFERED = 2
VERBOSITY_ERRORS_ONLY = 1

thoughts?