-
Notifications
You must be signed in to change notification settings - Fork 3k
Implement silent param for install/uninstall commands #7990
Comments
If you want npm to write minimal output when installing, you can set the
However, npm will still write to standard output and standard error. On a unix-like system such as Linux or OSX, you can suppress this output as well:
|
Thanks, but I'm using it programmatically through
Do you have a quick hint to initialize with log level silent in npm.load? |
Sure npm.load( {loglevel: "silent"}, function … ) But you should be careful, as the npm api is intended for internal use, and project policy allows npms api to change without affecting semver; semver applies only to the command line interface and behavior. |
Yep, I know... I will probably fork it for internal use and manage lifecycle directly... ;) Thanks! |
Perfect,
does exactly fit my needs. Thanks... ;) |
Testing with npm@2.8.4 and |
Hi @mattdesl, just to confirm we're talking about the same thing... With the snippet above we define log level silent that works only for console log from npm... All the logs you see at stdout when loglevel is silent should come directly from nodegyp or any other process (npm itself too) spawned with child stdio piped to your process.stdio... Did I understand correctly @smikes? |
Like @mattdesl said, I've the same problem with Between "done!" and "done!" there's another debug line printed with Is this a regression bug? UPDATE |
When using npm programmatically as module, install and uninstall does not accept any silent param. Just for example list command supports it.
The text was updated successfully, but these errors were encountered: