Skip to content

Commit 9f70c9f

Browse files
codertaoastefanutti
authored andcommitted
Fixing environment being passed to exec auth
1 parent 1cf0c11 commit 9f70c9f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/auth/exec.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ class ExecAuth {
3434
promise = Promise.resolve(this.auth_provider);
3535
} else {
3636
promise = new Promise((resolve, reject) => {
37-
const process = execFile(this.auth_provider.command, this.auth_provider.args , {'env' : this.auth_provider.env}, (error, stdout, stderr) => {
37+
const env = {};
38+
if(this.auth_provider.env) {
39+
this.auth_provider.env.forEach(kvp => env[kvp.name] = kvp.value);
40+
}
41+
const process = execFile(this.auth_provider.command, this.auth_provider.args , { env }, (error, stdout, stderr) => {
3842
cancel = function (){};
3943
if (error) {
4044
reject(error);

0 commit comments

Comments
 (0)