Skip to content
Merged
Changes from 2 commits
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
9 changes: 2 additions & 7 deletions src/gcp_auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,12 @@ export class GoogleCloudPlatformAuth implements Authenticator {
if (!cmd) {
throw new Error('Token is expired!');
}
// Wrap cmd in quotes to make it cope with spaces in path
cmd = `"${cmd}"`;
const args = config['cmd-args'];
if (args) {
cmd = cmd + ' ' + args;
}
const args = config['cmd-args'] ? config['cmd-args'].split(' ') : [];
// TODO: Cache to file?
// TODO: do this asynchronously
let output: any;
try {
output = proc.execSync(cmd);
output = proc.execFileSync(cmd, args);
} catch (err) {
throw new Error('Failed to refresh token: ' + (err as Error).message);
}
Expand Down
Loading