Skip to content

Commit c91fa6e

Browse files
Merge pull request #51 from cbuchacher/fix-token-refresh-gke-windows
fix token refresh for GKE on Windows
2 parents eb8a8fe + 738118f commit c91fa6e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

node-client/src/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,14 @@ export class KubeConfig {
130130
let expiration = Date.parse(expiry);
131131
if (expiration < Date.now()) {
132132
if (config['cmd-path']) {
133-
let cmd = config['cmd-path'];
133+
let cmd = '"' + config['cmd-path'] + '"';
134134
if (config['cmd-args']) {
135135
cmd = cmd + ' ' + config['cmd-args'];
136136
}
137137
// TODO: Cache to file?
138138
const result = shelljs.exec(cmd, { silent: true });
139139
if (result['code'] != 0) {
140-
throw new Error('Failed to refresh token: ' + result);
140+
throw new Error('Failed to refresh token: ' + result.stderr);
141141
}
142142
let resultObj = JSON.parse(result.stdout.toString());
143143

0 commit comments

Comments
 (0)