Skip to content

Commit 9418c44

Browse files
committed
NPM_CONFIG environment variable can technically have a hyphen
1 parent 90b574a commit 9418c44

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • src/main/kotlin/com/github/gradle/node/npm/proxy

src/main/kotlin/com/github/gradle/node/npm/proxy/NpmProxy.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ class NpmProxy {
1616

1717
// And since npm also takes settings in the form of environment variables with the
1818
// NPM_CONFIG_<setting> format, we should check those. Hopefully nobody does this.
19+
// Windows will let you set environment variables with hyphens in them, but shells
20+
// on Linux will fight you so you'll have to be sneaky, adding both here "just in case".
1921
private val npmProxyVariables = listOf(
20-
"NPM_CONFIG_PROXY", "NPM_CONFIG_HTTPS-PROXY", "NPM_CONFIG_NOPROXY"
22+
"NPM_CONFIG_PROXY", "NPM_CONFIG_HTTPS-PROXY", "NPM_CONFIG_HTTPS_PROXY", "NPM_CONFIG_NOPROXY"
2123
)
2224

2325
fun computeNpmProxyEnvironmentVariables(): Map<String, String> {

0 commit comments

Comments
 (0)