diff options
author | nlf <quitlahok@gmail.com> | 2021-11-04 22:55:21 +0300 |
---|---|---|
committer | Gar <gar+gh@danger.computer> | 2021-11-04 23:04:46 +0300 |
commit | a0d35ff20aed6aab8508123eb540bc9c61fb127d (patch) | |
tree | af673dea52f9eff2a7f85c327b3e92bec68b078d /node_modules | |
parent | 1e9c31c4e3929483580a0a554d7515095b5418ca (diff) |
deps: @npmcli/config@2.3.1nlf/dep-npmcli-config
* fix: dont load project configs in global mode
PR-URL: https://github.com/npm/cli/pull/3996
Credit: @nlf
Close: #3996
Reviewed-by: @wraithgar
PR-URL: https://github.com/npm/cli/pull/3996
Credit: @nlf
Close: #3996
Reviewed-by: @wraithgar
Diffstat (limited to 'node_modules')
-rw-r--r-- | node_modules/@npmcli/config/lib/index.js | 6 | ||||
-rw-r--r-- | node_modules/@npmcli/config/package.json | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/node_modules/@npmcli/config/lib/index.js b/node_modules/@npmcli/config/lib/index.js index f947896f0..724ce14c3 100644 --- a/node_modules/@npmcli/config/lib/index.js +++ b/node_modules/@npmcli/config/lib/index.js @@ -497,6 +497,12 @@ class Config { } async loadProjectConfig () { + if (this[_get]('global') === true || this[_get]('location') === 'global') { + this.data.get('project').source = '(global mode enabled, ignored)' + this.sources.set(this.data.get('project').source, 'project') + return + } + // the localPrefix can be set by the CLI config, but otherwise is // found by walking up the folder tree await this.loadLocalPrefix() diff --git a/node_modules/@npmcli/config/package.json b/node_modules/@npmcli/config/package.json index b31eecbe3..f36d8f7b1 100644 --- a/node_modules/@npmcli/config/package.json +++ b/node_modules/@npmcli/config/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/config", - "version": "2.3.0", + "version": "2.3.1", "files": [ "lib" ], |