diff options
author | Gar <gar+gh@danger.computer> | 2021-03-24 01:48:52 +0300 |
---|---|---|
committer | Gar <gar+gh@danger.computer> | 2021-03-24 20:26:20 +0300 |
commit | 0379eab698b78ae4aa89bbe2043607f420e52f11 (patch) | |
tree | aa7448a6e975c7f9dff6d527e7e0c0e4fa5c2a3a /lib | |
parent | c0b392c7351180fea8b5aed14b04d19a910959a8 (diff) |
fix(install): ignore auditLevel
`npm install` should not be affected by the `auditLevel` config, as the
results of audit do not change its exit status.
PR-URL: https://github.com/npm/cli/pull/2929
Credit: @wraithgar
Close: #2929
Reviewed-by: @ljharb, @ruyadorno
Diffstat (limited to 'lib')
-rw-r--r-- | lib/install.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/install.js b/lib/install.js index 54ea6d825..d3f11983d 100644 --- a/lib/install.js +++ b/lib/install.js @@ -126,15 +126,15 @@ class Install extends BaseCommand { if (this.npm.config.get('dev')) log.warn('install', 'Usage of the `--dev` option is deprecated. Use `--include=dev` instead.') - const arb = new Arborist({ + const opts = { ...this.npm.flatOptions, + auditLevel: null, path: where, - }) - - await arb.reify({ - ...this.npm.flatOptions, add: args, - }) + } + const arb = new Arborist(opts) + await arb.reify(opts) + if (!args.length && !isGlobalInstall && !ignoreScripts) { const scriptShell = this.npm.config.get('script-shell') || undefined const scripts = [ |