Skip to content

Commit

Permalink
Merge pull request #51 from cbuchacher/fix-token-refresh-gke-windows
Browse files Browse the repository at this point in the history
fix token refresh for GKE on Windows
  • Loading branch information
brendandburns committed Jul 9, 2018
2 parents eb8a8fe + 738118f commit c91fa6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions node-client/src/config.ts
Expand Up @@ -130,14 +130,14 @@ export class KubeConfig {
let expiration = Date.parse(expiry);
if (expiration < Date.now()) {
if (config['cmd-path']) {
let cmd = config['cmd-path'];
let cmd = '"' + config['cmd-path'] + '"';
if (config['cmd-args']) {
cmd = cmd + ' ' + config['cmd-args'];
}
// TODO: Cache to file?
const result = shelljs.exec(cmd, { silent: true });
if (result['code'] != 0) {
throw new Error('Failed to refresh token: ' + result);
throw new Error('Failed to refresh token: ' + result.stderr);
}
let resultObj = JSON.parse(result.stdout.toString());

Expand Down

0 comments on commit c91fa6e

Please sign in to comment.