{"action":"created","issue":{"url":"https://api.github.com/repos/npm/npm/issues/5452","labels_url":"https://api.github.com/repos/npm/npm/issues/5452/labels{/name}","comments_url":"https://api.github.com/repos/npm/npm/issues/5452/comments","events_url":"https://api.github.com/repos/npm/npm/issues/5452/events","html_url":"https://github.com/npm/npm/issues/5452","id":35342269,"number":5452,"title":"default npm run to silent","user":{"login":"Raynos","id":479538,"avatar_url":"https://avatars.githubusercontent.com/u/479538?v=3","gravatar_id":"","url":"https://api.github.com/users/Raynos","html_url":"https://github.com/Raynos","followers_url":"https://api.github.com/users/Raynos/followers","following_url":"https://api.github.com/users/Raynos/following{/other_user}","gists_url":"https://api.github.com/users/Raynos/gists{/gist_id}","starred_url":"https://api.github.com/users/Raynos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Raynos/subscriptions","organizations_url":"https://api.github.com/users/Raynos/orgs","repos_url":"https://api.github.com/users/Raynos/repos","events_url":"https://api.github.com/users/Raynos/events{/privacy}","received_events_url":"https://api.github.com/users/Raynos/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/npm/npm/labels/feature-request","name":"feature-request","color":"ACE1AF"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2014-06-10T01:34:55Z","updated_at":"2015-07-08T12:05:57Z","closed_at":null,"body":"When we use `npm run custom-script`, if the custom script exits 1 it currently outputs\r\n\r\n```\r\nnpm ERR! dispatch@2.16.0 foo: `exit 1;`\r\nnpm ERR! Exit status 1\r\nnpm ERR! \r\nnpm ERR! Failed at the dispatch@2.16.0 foo script.\r\nnpm ERR! This is most likely a problem with the dispatch package,\r\nnpm ERR! not with npm itself.\r\nnpm ERR! Tell the author that this fails on your system:\r\nnpm ERR!     exit 1;\r\nnpm ERR! You can get their info via:\r\nnpm ERR!     npm owner ls dispatch\r\nnpm ERR! There is likely additional logging output above.\r\nnpm ERR! System Linux 3.13.0-24-generic\r\nnpm ERR! command \"node\" \"/home/raynos/projects/nvm/v0.10.26/bin/npm\" \"run\" \"foo\"\r\nnpm ERR! cwd /home/raynos/uber/dispatch\r\nnpm ERR! node -v v0.10.26\r\nnpm ERR! npm -v 1.4.12\r\nnpm ERR! code ELIFECYCLE\r\nnpm ERR! \r\nnpm ERR! Additional logging details can be found in:\r\nnpm ERR!     /home/raynos/uber/dispatch/npm-debug.log\r\nnpm ERR! not ok code 0\r\n```\r\n\r\nThis seems like a lot of noise for something that is not part of npm.\r\n\r\nWhen I write a `npm run some-script` script I am expected to write useful things to stderr when I exit 1. The text generated by npm does actually not help.\r\n\r\nWe might want to whitelist some certain run scripts like `npm run preinstall` etc so that it does output this.\r\n\r\nHowever for something truly custom like `npm run changelog-patch` or `npm run shrinkwrap`,  run targets not used by npm at all, it might make sense to default to `silent: true`\r\n\r\n## Suggestion\r\n\r\nin `lib/run-script.js` if the run command is not in a whitelist of [postinstall, preinstall, etc, ...] then do an `npm.config.set('silent', true)`"},"comment":{"url":"https://api.github.com/repos/npm/npm/issues/comments/119551909","html_url":"https://github.com/npm/npm/issues/5452#issuecomment-119551909","issue_url":"https://api.github.com/repos/npm/npm/issues/5452","id":119551909,"user":{"login":"mnquintana","id":823545,"avatar_url":"https://avatars.githubusercontent.com/u/823545?v=3","gravatar_id":"","url":"https://api.github.com/users/mnquintana","html_url":"https://github.com/mnquintana","followers_url":"https://api.github.com/users/mnquintana/followers","following_url":"https://api.github.com/users/mnquintana/following{/other_user}","gists_url":"https://api.github.com/users/mnquintana/gists{/gist_id}","starred_url":"https://api.github.com/users/mnquintana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnquintana/subscriptions","organizations_url":"https://api.github.com/users/mnquintana/orgs","repos_url":"https://api.github.com/users/mnquintana/repos","events_url":"https://api.github.com/users/mnquintana/events{/privacy}","received_events_url":"https://api.github.com/users/mnquintana/received_events","type":"User","site_admin":false},"created_at":"2015-07-08T12:05:57Z","updated_at":"2015-07-08T12:05:57Z","body":":+1: This enhancement would be much appreciated - `npm run <custom command>` is just too noisy right now (especially if it happens to error out). I'd much rather see this default to silent and add a `--verbose` flag for those who want the full output."}}