Skip to content

Commit

Permalink
Environment variable prefixes should start at the beginning, not in t…
Browse files Browse the repository at this point in the history
…he middle of an environment variable. This fixes this example:

  SOME_YARN_CONFIG=123 yarn config list | grep some
    'some-yarn-config':
  { 'some-yarn-config':
  • Loading branch information
grembo committed Oct 9, 2018
1 parent 9bb2cfb commit b208fe1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,10 @@ Please add one entry in this file for each change in Yarn's behavior. Use the sa

## Master

- Fix parsing of environment variables when merging env into config

[#6518](https://github.com/yarnpkg/yarn/pull/6518) - [**Michael Gmelin**](https://blog.grem.de)

- Adds support for basic auth for registries with paths, such as artifactory

[#5322](https://github.com/yarnpkg/yarn/pull/5322) - [**Karolis Narkevicius**](https://twitter.com/KidkArolis)
Expand Down
2 changes: 1 addition & 1 deletion src/registries/base-registry.js
Expand Up @@ -151,7 +151,7 @@ export default class BaseRegistry {
let key = envKey.toLowerCase();

// only accept keys prefixed with the prefix
if (key.indexOf(prefix.toLowerCase()) < 0) {
if (key.indexOf(prefix.toLowerCase()) !== 0) {
continue;
}

Expand Down

0 comments on commit b208fe1

Please sign in to comment.