forked from npm/config
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: correctly handle nerf-darted env vars
fixes npm#64 Preserve them verbatim since: 1. The URI path may be case sensitive 2. The URI may have underscores that should not be dasherized 3. The "_" sub-key prefix should not be dasherized 4. The sub-key should not be downcased (i.e. npm-registry-fetch expects `...:_authToken`, not `...:_authtoken` This will allow you to successfully use env vars to control registry auth, e.g. ``` env npm_config_//reg.example/UP_CASE/:_authToken=secret npm install ``` Although Windows env variable lookups are case insensitive, key retrieval/ iteration is case preserving, so we can reliably get the originally set key.
- Loading branch information
Showing
3 changed files
with
40 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters