Skip to content

Commit 6fce793

Browse files
clydinhansl
authored andcommitted
fix(@schematics/update): replace environment variables in npm/yarn rc
1 parent a3e3bb2 commit 6fce793

File tree

1 file changed

+5
-0
lines changed
  • packages/schematics/update/update

1 file changed

+5
-0
lines changed

packages/schematics/update/update/npm.ts

+5
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ function readOptions(yarn = false): { [key: string]: string } {
6868
}
6969
}
7070

71+
// Substitute any environment variable references
72+
for (const key in options) {
73+
options[key] = options[key].replace(/\$\{([^\}]+)\}/, (_, name) => process.env[name] || '');
74+
}
75+
7176
return options;
7277
}
7378

0 commit comments

Comments
 (0)