Skip to content

Commit

Permalink
avoid override process env (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
adashen authored Jan 29, 2019
1 parent 1fcbe90 commit df24ad8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "azure-iot-edge",
"displayName": "Azure IoT Edge",
"description": "Develop, deploy, debug, and manage your IoT Edge solution",
"version": "1.9.0-rc",
"version": "1.9.0-rc2",
"publisher": "vsciot-vscode",
"aiKey": "95b20d64-f54f-4de3-8ad5-165a75a6c6fe",
"icon": "logo.png",
Expand Down
6 changes: 4 additions & 2 deletions src/common/executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ export class Executor {
const envVars = Executor.getEnvFromConfig();
const options: ExecSyncOptions = { encoding: "utf8" };
if (envVars) {
options.env = Executor.mergeEnvs(envVars, process.env);
const processEnvs = JSON.parse(JSON.stringify(process.env));
options.env = Executor.mergeEnvs(envVars, processEnvs);
}
return execSync(command, options);
}
Expand All @@ -40,7 +41,8 @@ export class Executor {
const envVars = Executor.getEnvFromConfig();
if (envVars) {
options = options || {};
const processEnvs = Executor.mergeEnvs(envVars, process.env);
let processEnvs = JSON.parse(JSON.stringify(process.env));
processEnvs = Executor.mergeEnvs(envVars, processEnvs);
options.env = Executor.mergeEnvs(options.env, processEnvs);
}

Expand Down

0 comments on commit df24ad8

Please sign in to comment.