Skip to content

Commit b208fe1

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 b208fe1

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ Please add one entry in this file for each change in Yarn's behavior. Use the sa
44

55
## Master
66

7+
- Fix parsing of environment variables when merging env into config
8+
9+
[#6518](https://github.com/yarnpkg/yarn/pull/6518) - [**Michael Gmelin**](https://blog.grem.de)
10+
711
- Adds support for basic auth for registries with paths, such as artifactory
812

913
[#5322](https://github.com/yarnpkg/yarn/pull/5322) - [**Karolis Narkevicius**](https://twitter.com/KidkArolis)

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)