Skip to content

Commit 803549b

Browse files
committed
fix: Fix duplicate error message
1 parent d9987e4 commit 803549b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/cloud_auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class CloudAuth implements Authenticator {
3232
}
3333
result = shelljs.exec(cmd);
3434
if (result.code !== 0) {
35-
throw new Error(`Failed to refresh token: ${result.stderr}`);
35+
throw new Error(result.stderr);
3636
}
3737
} catch (err) {
3838
throw new Error('Failed to refresh token: ' + err.message);

src/config_test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ describe('KubeConfig', () => {
596596
} as User);
597597
const opts = {} as requestlib.Options;
598598
expect(() => config.applyToRequest(opts)).to.throw(
599-
'Failed to refresh token: /bin/sh: 1: non-existent-command: not found');
599+
'Failed to refresh token: /bin/sh: non-existent-command: command not found');
600600
});
601601

602602
it('should exec with expired token', () => {

0 commit comments

Comments
 (0)