Cli: [BUG] npm run-script --silent now broken completely

Created on 23 Oct 2020  ·  3Comments  ·  Source: npm/cli

Note: Issue https://github.com/npm/cli/issues/1958 refers to --silent suppressing all output.

Current Behavior:


npm run --silent script now outputs everything, eg:

$ npm run --silent checksum 

> @cliff/[email protected] checksum
> cat *coffee | cksum | cut -d' ' -f1

3115970741

In other words, the --silent flag is doing nothing.

Expected Behavior:

$ npm --version
6.14.8
$ npm run --silent checksum
3115970741

Steps To Reproduce:

See above.

Environment:

  • OS: Ubuntu 20.04.1
  • Node: v15.0.1
  • npm: v7.0.3
Bug Needs Triage Release 7.x

All 3 comments

We are facing the same issue. In Jenkins we use npm run -s cmd to retrieve some infos, this bug completely broke our pipelines.

@CliffS there's a typo in the title: s/rpm run-script/npm run-script/ would you mind to fix it? 🙇

Released npm 7.0.7 that fixes it:

root@e8ca26fa92e7:~/t1# npm version
{
  t1: '1.0.0',
  npm: '7.0.3',
  node: '15.0.1',
  v8: '8.6.395.17-node.15',
  uv: '1.40.0',
  zlib: '1.2.11',
  brotli: '1.0.9',
  ares: '1.16.1',
  modules: '88',
  nghttp2: '1.41.0',
  napi: '7',
  llhttp: '2.1.3',
  openssl: '1.1.1g',
  cldr: '37.0',
  icu: '67.1',
  tz: '2020a',
  unicode: '13.0'
}
root@e8ca26fa92e7:~/t1# npm test -s

> [email protected] test
> echo "Error: no test specified" && exit 1

Error: no test specified
root@e8ca26fa92e7:~/t1# npm i -g [email protected]

changed 1 package, and audited 248 packages in 3s

10 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
root@e8ca26fa92e7:~/t1# npm version
{
  t1: '1.0.0',
  npm: '7.0.7',
  node: '15.0.1',
  v8: '8.6.395.17-node.15',
  uv: '1.40.0',
  zlib: '1.2.11',
  brotli: '1.0.9',
  ares: '1.16.1',
  modules: '88',
  nghttp2: '1.41.0',
  napi: '7',
  llhttp: '2.1.3',
  openssl: '1.1.1g',
  cldr: '37.0',
  icu: '67.1',
  tz: '2020a',
  unicode: '13.0'
}
root@e8ca26fa92e7:~/t1# npm test -s
Error: no test specified
root@e8ca26fa92e7:~/t1#

I think we can close this issue

Was this page helpful?
0 / 5 - 0 ratings