Cli: [BUG] `--silent` suppresses output from run commands

Created on 14 Oct 2020  路  4Comments  路  Source: npm/cli

Previously in pre-npm 7 --silent would only silence output from npm, meaning that run would still output the output from whatever is being run.

Now, it silences everything, meaning we can't use --silent to silence the npm ERR! messages that follow whenever a command fails.

Current Behavior:

> npm run typecheck --silent

Expected Behavior:

> npm run typecheck --silent

src/audit.ts:137:13 - error TS2345: Argument of type 'AuditMetadata | NpmAuditMetadataV2' is not assignable to parameter of type 'AuditMetadata'.
  Type 'NpmAuditMetadataV2' is missing the following properties from type 'AuditMetadata': devDependencies, optionalDependencies, totalDependencies

137             auditOutput.metadata
                ~~~~~~~~~~~~~~~~~~~~


Found 1 error.

Steps To Reproduce:

Environment:

  • OS: Ubuntu 18.04 (via WSLv1, Windows 10)
  • Node: 14.4.0
  • npm: 7.0.0
Bug Release 7.x

Most helpful comment

Very on-brand for this issue, folks 馃槅
Screen Shot 2020-10-19 at 17 17 02

All 4 comments

Did you perhaps swap current/expected behavior here?

@ljharb whoops yeah good catch 馃槄

Very on-brand for this issue, folks 馃槅
Screen Shot 2020-10-19 at 17 17 02

Should be fixed as of 7.0.3

Was this page helpful?
0 / 5 - 0 ratings