Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGar <gar+gh@danger.computer>2021-07-02 16:55:14 +0300
committerGar <gar+gh@danger.computer>2021-07-12 18:50:07 +0300
commit3ecf19cdc35684ccb15280b2c34d27496aa1c634 (patch)
tree89062f380d0a942a4f83e1c8b5b1673fa917a9c1 /lib/utils/config/definitions.js
parentf17aca5cdf355aaa7e1f517d1b3bb4213f4df092 (diff)
fix(config): fix noproxy
The flattener worked for everything except for when you are using `npm config set` itself. Now it works for both. PR-URL: https://github.com/npm/cli/pull/3508 Credit: @wraithgar Close: #3508 Reviewed-by: @nlf
Diffstat (limited to 'lib/utils/config/definitions.js')
-rw-r--r--lib/utils/config/definitions.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/utils/config/definitions.js b/lib/utils/config/definitions.js
index 5375aeced..9e560fb71 100644
--- a/lib/utils/config/definitions.js
+++ b/lib/utils/config/definitions.js
@@ -1204,7 +1204,10 @@ define('noproxy', {
Also accepts a comma-delimited string.
`,
flatten (key, obj, flatOptions) {
- flatOptions.noProxy = obj[key].join(',')
+ if (Array.isArray(obj[key]))
+ flatOptions.noProxy = obj[key].join(',')
+ else
+ flatOptions.noProxy = obj[key]
},
})