Skip to content
This repository was archived by the owner on Jun 17, 2020. It is now read-only.

Commit 418d391

Browse files
committed
Only replace environment variables in YAML
1 parent 8f69356 commit 418d391

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/optimist-config-file.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ function parseConfigFile(configFileName, replacementVars) {
3131
// parse it
3232
try {
3333
raw = fs.readFileSync(configFileName).toString();
34-
if (replacementVars instanceof Object) {
35-
raw = replace(raw, replacementVars);
36-
}
3734

3835
switch (configMode) {
3936
case 'YAML':
37+
if (replacementVars instanceof Object) {
38+
raw = replace(raw, replacementVars);
39+
}
4040
configParsed = yaml.safeLoad(raw);
4141
break;
4242

0 commit comments

Comments
 (0)