@npmcli/config 2.3.1 → 2.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.js +5 -3
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -497,15 +497,17 @@ class Config {
497
497
  }
498
498
 
499
499
  async loadProjectConfig () {
500
+ // the localPrefix can be set by the CLI config, but otherwise is
501
+ // found by walking up the folder tree. either way, we load it before
502
+ // we return to make sure localPrefix is set
503
+ await this.loadLocalPrefix()
504
+
500
505
  if (this[_get]('global') === true || this[_get]('location') === 'global') {
501
506
  this.data.get('project').source = '(global mode enabled, ignored)'
502
507
  this.sources.set(this.data.get('project').source, 'project')
503
508
  return
504
509
  }
505
510
 
506
- // the localPrefix can be set by the CLI config, but otherwise is
507
- // found by walking up the folder tree
508
- await this.loadLocalPrefix()
509
511
  const projectFile = resolve(this.localPrefix, '.npmrc')
510
512
  // if we're in the ~ directory, and there happens to be a node_modules
511
513
  // folder (which is not TOO uncommon, it turns out), then we can end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npmcli/config",
3
- "version": "2.3.1",
3
+ "version": "2.3.2",
4
4
  "files": [
5
5
  "lib"
6
6
  ],