We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3903d83 commit aa6e2e3Copy full SHA for aa6e2e3
src/gcp_auth.ts
@@ -66,17 +66,13 @@ export class GoogleCloudPlatformAuth implements Authenticator {
66
if (!cmd) {
67
throw new Error('Token is expired!');
68
}
69
- // Wrap cmd in quotes to make it cope with spaces in path
70
- cmd = `"${cmd}"`;
71
- const args = config['cmd-args'];
72
- if (args) {
73
- cmd = cmd + ' ' + args;
74
- }
+ const cmdPath = config['cmd-path'];
+ const args = config['cmd-args'] ? config['cmd-args'].split(' ') : [];
75
// TODO: Cache to file?
76
// TODO: do this asynchronously
77
let output: any;
78
try {
79
- output = proc.execSync(cmd);
+ output = proc.execFileSync(cmdPath, args);
80
} catch (err) {
81
throw new Error('Failed to refresh token: ' + (err as Error).message);
82
0 commit comments