Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3c0a7b0

Browse filesBrowse files
committed
install: fix circular dependency with config stuff
1 parent 1c3b226 commit 3c0a7b0
Copy full SHA for 3c0a7b0

File tree

Expand file treeCollapse file tree

2 files changed

+11
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+11
-2
lines changed

‎lib/fetch-package-metadata.js

Copy file name to clipboardExpand all lines: lib/fetch-package-metadata.js
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const rimraf = require('rimraf')
88
const validate = require('aproba')
99
const npa = require('npm-package-arg')
1010
const npm = require('./npm')
11-
const npmConfig = require('./config/figgy-config.js')
11+
let npmConfig
1212
const npmlog = require('npmlog')
1313
const limit = require('call-limit')
1414
const tempFilename = require('./utils/temp-filename')
@@ -52,6 +52,9 @@ function fetchPackageMetadata (spec, where, opts, done) {
5252
err.code = 'EWINDOWSPATH'
5353
return logAndFinish(err)
5454
}
55+
if (!npmConfig) {
56+
npmConfig = require('./config/figgy-config.js')
57+
}
5558
pacote.manifest(dep, npmConfig({
5659
annotate: true,
5760
fullMetadata: opts.fullMetadata,
@@ -95,6 +98,9 @@ function addBundled (pkg, next) {
9598
}
9699
pkg._bundled = null
97100
const target = tempFilename('unpack')
101+
if (!npmConfig) {
102+
npmConfig = require('./config/figgy-config.js')
103+
}
98104
const opts = npmConfig({integrity: pkg._integrity})
99105
pacote.extract(pkg._resolved || pkg._requested || npa.resolve(pkg.name, pkg.version), target, opts).then(() => {
100106
log.silly('addBundled', 'read tarball')

‎lib/install/action/extract.js

Copy file name to clipboardExpand all lines: lib/install/action/extract.js
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const moduleStagingPath = require('../module-staging-path.js')
1010
const move = require('../../utils/move.js')
1111
const npa = require('npm-package-arg')
1212
const npm = require('../../npm.js')
13-
const npmConfig = require('../../config/figgy-config.js')
13+
let npmConfig
1414
const packageId = require('../../utils/package-id.js')
1515
const path = require('path')
1616
const localWorker = require('./extract-worker.js')
@@ -47,6 +47,9 @@ module.exports = extract
4747
function extract (staging, pkg, log) {
4848
log.silly('extract', packageId(pkg))
4949
const extractTo = moduleStagingPath(staging, pkg)
50+
if (!npmConfig) {
51+
npmConfig = require('../../config/figgy-config.js')
52+
}
5053
let opts = ExtractOpts(npmConfig()).concat({
5154
integrity: pkg.package._integrity,
5255
resolved: pkg.package._resolved

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.