From b0f4022fe85c96397506af23d72578a486a2125e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Tue, 18 Dec 2018 12:11:53 -0800 Subject: [PATCH] config: fix figgy-config for default params Fixes: https://npm.community/t/npm-audit-error-messaging-update-for-401s/3983 --- lib/config/figgy-config.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/config/figgy-config.js b/lib/config/figgy-config.js index 9e9ca0ba561ef..8ca1fd963756d 100644 --- a/lib/config/figgy-config.js +++ b/lib/config/figgy-config.js @@ -24,7 +24,11 @@ let baseConfig module.exports = mkConfig function mkConfig (...providers) { if (!baseConfig) { - baseConfig = NpmConfig(npm.config, { + const allOpts = {} + npm.config.forEach(k => { + allOpts[k] = npm.config.get(k) + }) + baseConfig = NpmConfig(allOpts, { // Add some non-npm-config opts by hand. cache: path.join(npm.config.get('cache'), '_cacache'), // NOTE: npm has some magic logic around color distinct from the config