Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Attach env vars from kube config when renewing token #209

Merged
merged 4 commits into from
May 18, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,13 @@ function getToken(userInfo) {
if (profile) {
envvars.AWS_PROFILE = profile.value;
}
for (const envvar of env) {
envvars[envvar.name] = envvar.value ?? ""
}
}
let output = {};
try {
output = proc.execSync(cmd, envvars);
output = proc.execSync(cmd, {env: envvars});
} catch (err) {
throw new Error(`Failed to refresh token: ${err.message}`);
}
Expand Down