Skip to content

Commit 77a6edd

Browse files
committed
Fix formatting.
1 parent 7457a05 commit 77a6edd

File tree

3 files changed

+22
-8
lines changed

3 files changed

+22
-8
lines changed

src/config.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,16 @@ export class KubeConfig {
325325
}
326326
if (process.platform === 'win32') {
327327
try {
328-
const envKubeconfigPathResult = child_process.spawnSync('wsl.exe', ['bash', '-c', 'printenv KUBECONFIG']);
328+
const envKubeconfigPathResult = child_process.spawnSync('wsl.exe', [
329+
'bash',
330+
'-c',
331+
'printenv KUBECONFIG',
332+
]);
329333
if (envKubeconfigPathResult.status === 0 && envKubeconfigPathResult.stdout.length > 0) {
330-
const result = child_process.spawnSync('wsl.exe', ['cat', envKubeconfigPathResult.stdout.toString('utf8')]);
334+
const result = child_process.spawnSync('wsl.exe', [
335+
'cat',
336+
envKubeconfigPathResult.stdout.toString('utf8'),
337+
]);
331338
if (result.status === 0) {
332339
this.loadFromString(result.stdout.toString('utf8'), opts);
333340
return;

src/exec_auth.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ export interface Credential {
1818

1919
export class ExecAuth implements Authenticator {
2020
private readonly tokenCache: { [key: string]: Credential | null } = {};
21-
private execFn: (cmd: string, args: string[], opts: child_process.SpawnOptions) => child_process.SpawnSyncReturns<Buffer> =
22-
child_process.spawnSync;
21+
private execFn: (
22+
cmd: string,
23+
args: string[],
24+
opts: child_process.SpawnOptions,
25+
) => child_process.SpawnSyncReturns<Buffer> = child_process.spawnSync;
2326

2427
public isAuthProvider(user: User): boolean {
2528
if (!user) {

src/exec_auth_test.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ describe('ExecAuth', () => {
9999
): child_process.SpawnSyncReturns<Buffer> => {
100100
return {
101101
status: 0,
102-
stdout: Buffer.from(JSON.stringify({ status: { clientCertificateData: 'foo', clientKeyData: 'bar' } })),
102+
stdout: Buffer.from(
103+
JSON.stringify({ status: { clientCertificateData: 'foo', clientKeyData: 'bar' } }),
104+
),
103105
} as child_process.SpawnSyncReturns<Buffer>;
104106
};
105107

@@ -139,9 +141,11 @@ describe('ExecAuth', () => {
139141
execCount++;
140142
return {
141143
status: 0,
142-
stdout: Buffer.from(JSON.stringify({
143-
status: { token: tokenValue, expirationTimestamp: expire },
144-
})),
144+
stdout: Buffer.from(
145+
JSON.stringify({
146+
status: { token: tokenValue, expirationTimestamp: expire },
147+
}),
148+
),
145149
} as child_process.SpawnSyncReturns<Buffer>;
146150
};
147151

0 commit comments

Comments
 (0)