diff options
author | npm CLI robot <npm-cli+bot@github.com> | 2022-08-11 07:35:43 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-11 14:35:43 +0000 |
commit | ccfd90007cd9de9ef1456e048de3a9abd54c5ae5 (patch) | |
tree | 6d588a10b0833ed6a0d5fb349669f8c7f0dc8b1a /deps/npm/lib | |
parent | 4c9ad2bd4c578228c7b1b62e10e25daaa0fcbeff (diff) | |
download | node-new-ccfd90007cd9de9ef1456e048de3a9abd54c5ae5.tar.gz |
deps: upgrade npm to 8.17.0
PR-URL: https://github.com/nodejs/node/pull/44205
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Ruy Adorno <ruyadorno@google.com>
Diffstat (limited to 'deps/npm/lib')
-rw-r--r-- | deps/npm/lib/commands/exec.js | 9 | ||||
-rw-r--r-- | deps/npm/lib/commands/query.js | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/deps/npm/lib/commands/exec.js b/deps/npm/lib/commands/exec.js index ddbb5f7cf9..a77a6326c0 100644 --- a/deps/npm/lib/commands/exec.js +++ b/deps/npm/lib/commands/exec.js @@ -34,6 +34,7 @@ class Exec extends BaseCommand { const args = [..._args] const call = this.npm.config.get('call') + let globalPath const { flatOptions, localBin, @@ -44,6 +45,12 @@ class Exec extends BaseCommand { const scriptShell = this.npm.config.get('script-shell') || undefined const packages = this.npm.config.get('package') const yes = this.npm.config.get('yes') + // --prefix sets both of these to the same thing, meaning the global prefix + // is invalid (i.e. no lib/node_modules). This is not a trivial thing to + // untangle and fix so we work around it here. + if (this.npm.localPrefix !== this.npm.globalPrefix) { + globalPath = path.resolve(globalDir, '..') + } if (call && _args.length) { throw this.usageError() @@ -59,7 +66,7 @@ class Exec extends BaseCommand { localBin, locationMsg, globalBin, - globalPath: path.resolve(globalDir, '..'), + globalPath, output, packages, path: localPrefix, diff --git a/deps/npm/lib/commands/query.js b/deps/npm/lib/commands/query.js index 371fddef9b..60294acaf4 100644 --- a/deps/npm/lib/commands/query.js +++ b/deps/npm/lib/commands/query.js @@ -58,6 +58,7 @@ class Query extends BaseCommand { const opts = { ...this.npm.flatOptions, path: where, + forceActual: true, } const arb = new Arborist(opts) const tree = await arb.loadActual(opts) |