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 e4a777f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/registries/base-registry.js
Original file line number Diff line number Diff line change
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 e4a777f

Please sign in to comment.