windows-build-tools
windows-build-tools copied to clipboard
Silent mode broken
The readme mentions a --silent
option for performing silent installs. I see src/logging.js check process.env.npm_config_disable_logging
but it looks like the code that sets that variable is missing. Setting that variable suppresses some logging, but not the magic multi-file log printing - I think single-line-log.js
also needs to check this variable. In fact, that's mostly what I want to suppress - the terminal control code output is pretty ugly in CI 😄 If there was an option to just suppress the single line log, I'd use it.
Which command are you running? It's important that --silent
is appended right after the npm
keyword. Npm will go and turn that into the environment variable you see above.
Pretty sure I tired that. Since it doesn’t suppress the install logs, it’s possible that I just missed the effect.
It looks like NPM no longer uses an environment variable for these. --silent
is an alias for --loglevel silent
, --quiet
is an alias for --loglevel warn
. npm depends on a package called npmlog. Once the npmlog object is created, lib/npm.js sets .level
to the loglevel command line parameter. I don't think anything sets that env var anymore.
https://github.com/npm/npm/blob/latest/lib/npm.js#L291 and https://github.com/npm/npmlog