Skip to content

Commit e4a777f

Browse files
committed
Environment variable prefixes should start at the beginning, not in the middle of an environment variable. This fixes this example:
SOME_YARN_CONFIG=123 yarn config list | grep some 'some-yarn-config': { 'some-yarn-config':
1 parent 9bb2cfb commit e4a777f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/registries/base-registry.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ export default class BaseRegistry {
151151
let key = envKey.toLowerCase();
152152

153153
// only accept keys prefixed with the prefix
154-
if (key.indexOf(prefix.toLowerCase()) < 0) {
154+
if (key.indexOf(prefix.toLowerCase()) !== 0) {
155155
continue;
156156
}
157157

0 commit comments

Comments
 (0)