From af7b37a1116a57c574c71d824f72cdcba7d59949 Mon Sep 17 00:00:00 2001 From: Lauri Nevala Date: Tue, 1 Sep 2020 14:06:40 +0300 Subject: [PATCH] Display error if KubeAuthProxy fails to run Signed-off-by: Lauri Nevala --- src/main/kube-auth-proxy.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/kube-auth-proxy.ts b/src/main/kube-auth-proxy.ts index b388720cce..33521fdcf5 100644 --- a/src/main/kube-auth-proxy.ts +++ b/src/main/kube-auth-proxy.ts @@ -44,6 +44,10 @@ export class KubeAuthProxy { } logger.debug(`spawning kubectl proxy with args: ${args}`) this.proxyProcess = spawn(proxyBin, args, { env: this.env, }) + this.proxyProcess.on("error", (error) => { + this.sendIpcLogMessage({ data: error.message, error: true }) + this.exit() + }) this.proxyProcess.on("exit", (code) => { this.sendIpcLogMessage({ data: `proxy exited with code: ${code}`, error: code > 0 })