Skip to content

Commit

Permalink
docs: described exit codes in npm-audit docs
Browse files Browse the repository at this point in the history
PR-URL: #135
Credit: @emilis-tm
Reviewed-By: @zkat
  • Loading branch information
emilis-tm authored and zkat committed Feb 18, 2019
1 parent a805a95 commit 433020e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion doc/cli/npm-audit.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ $ npm audit --parseable | awk -F $'\t' '{print $1,$4}'
The audit command submits a description of the dependencies configured in
your project to your default registry and asks for a report of known
vulnerabilities. The report returned includes instructions on how to act on
this information.
this information. The command will exit with a 0 exit code if no
vulnerabilities were found.

You can also have npm automatically fix the vulnerabilities by running `npm
audit fix`. Note that some vulnerabilities cannot be fixed automatically and
Expand Down Expand Up @@ -99,6 +100,13 @@ The non-reversible identifiers are a sha256 of a session-specific UUID and the
value being replaced, ensuring a consistent value within the payload that is
different between runs.

## EXIT CODE

The `npm audit` command will exit with a 0 exit code if no vulnerabilities were found.

If vulnerabilities were found the exit code will depend on the `audit-level`
configuration setting.

## SEE ALSO

* npm-install(1)
Expand Down

0 comments on commit 433020e

Please sign in to comment.