Detect invalid bundled kubectl (#778)

* Test bundled kubectl

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala authored and GitHub committed 2020-09-01 14:28:59 +03:00
1 parent f4d262b294
commit 533646cba5
4 files changed
+74 -15

No files matched your search

+4
View File
@@ -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 })