Skip to content

Commit

Permalink
fix(@schematics/update): replace environment variables in npm/yarn rc
Browse files Browse the repository at this point in the history
  • Loading branch information
clydin authored and hansl committed Nov 22, 2018
1 parent a3e3bb2 commit 6fce793
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/schematics/update/update/npm.ts
Expand Up @@ -68,6 +68,11 @@ function readOptions(yarn = false): { [key: string]: string } {
}
}

// Substitute any environment variable references
for (const key in options) {
options[key] = options[key].replace(/\$\{([^\}]+)\}/, (_, name) => process.env[name] || '');
}

return options;
}

Expand Down

0 comments on commit 6fce793

Please sign in to comment.