ljharb/ls-engines

Silence output on success

tregusti opened this issue · 4 comments

This is a nice little tool you have here, but having this added to prepare script in many of our projects it would be nice to silence the output when the check is successful.

A good rule for CLI tools is to follow the UNIX philosophy regarding output.

I would prefer a breaking change and silence by default (as per the link above) and add a --verbose or --level flag. As an alternative solution a --silent flag could work, but then the question arises – what to silence. Only success output? All tips? Not errors should be silenced though.

Thoughts?

You can easily silence non-error output with > /dev/null.

Thank you, but that is not platform independent. We have many developers on multiple platforms.

The specific problem I have is solvable, but the issue is more that there is unneeded output when there as per practice should be none.

Let's not dance around with euphemisms; it's node, and the only platform where that doesn't work is Windows, so that must be what you're discussing? Why would an argument about the UNIX philosophy apply to Windows?

Looks like Windows has its own way of doing this, so there's no need for individual programs to offer it. https://stackoverflow.com/questions/11463544/how-to-suppress-windows-command-output