• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

npm / cli / #2173
97%
latest: 97%

Build:
Build:
LAST BUILD BRANCH: nlf/arborist-validation
DEFAULT BRANCH: latest
Ran 26 May 2021 08:16PM UTC
Jobs 1
Files 123
Run time 12min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
#2173

push

wraithgar
fix: set audit exit code properly

When running 'npm audit', we properly exited correctly with the
appropriate exitCode based on the audit level config and the report
results.

However, when going through the reifyFinish() function (as we do for
'npm audit fix'), we were not setting that properly if the auditLevel
was not set.

Furthermore, if the auditLevel WAS set, we were setting the exit code to
non-zero for *other* reify commands (install, update, etc.), where the
audit information should be strictly advisory.

When --json and --loglevel=silent were set, the exitCode was never being
set properly.

This fixes all these problems.

PR-URL: https://github.com/npm/cli/pull/3311
Credit: @isaacs
Close: #3311
Reviewed-by: @wraithgar

3096 of 3203 branches covered (96.66%)

Branch coverage included in aggregate %.

13 of 13 new or added lines in 1 file covered. (100.0%)

5279 of 5442 relevant lines covered (97.0%)

24.31 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #2173.1 26 May 2021 08:16PM UTC 0
96.88
Source Files on build #2173
Detailed source file information is not available for this build.
  • Back to Repo
  • 554e8a5c on github
  • Prev Build on isaacs/audit-level-reify-exit-code
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc