From fe1c92c56e076cf86369f099701a167725a213c8 Mon Sep 17 00:00:00 2001 From: Roman Date: Wed, 10 Jun 2020 11:47:51 +0300 Subject: [PATCH] fix coping files build step, reuse more common/vars --- package.json | 10 +++++++++- src/main/shell-session.ts | 7 ++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 2b5b990f28..aa4ed61308 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,15 @@ "afterSign": "build/notarize.js", "extraResources": [ { - "from": "src/(features|static|locales)", + "from": "src/locales/", + "filter": "**/*.js" + }, + { + "from": "src/features/", + "filter": "**/*" + }, + { + "from": "static/", "filter": "**/*" }, "LICENSE" diff --git a/src/main/shell-session.ts b/src/main/shell-session.ts index ed13897a0a..05e49b917f 100644 --- a/src/main/shell-session.ts +++ b/src/main/shell-session.ts @@ -65,13 +65,10 @@ export class ShellSession extends EventEmitter { switch(path.basename(shell)) { case "powershell.exe": return ["-NoExit", "-command", `& {Set-Location $Env:USERPROFILE; $Env:PATH="${this.kubectlBinDir};${this.helmBinDir};$Env:PATH"}`] - break case "bash": return ["--init-file", path.join(this.kubectlBinDir, '.bash_set_path')] - break case "fish": return ["--login", "--init-command", `export PATH="${this.kubectlBinDir}:${this.helmBinDir}:$PATH"; export KUBECONFIG="${this.kubeconfigPath}"`] - break case "zsh": return ["--login"] default: @@ -132,7 +129,7 @@ export class ShellSession extends EventEmitter { protected pipeStdout() { // send shell output to websocket - this.shellProcess.on("data", ((data: string) => { + this.shellProcess.onData(((data: string) => { this.sendResponse(data) }).bind(this)); } @@ -187,7 +184,7 @@ export class ShellSession extends EventEmitter { protected killShellProcess(){ if(this.running) { // On Windows we need to kill the shell process by pid, since Lens won't respond after a while if using `this.shellProcess.kill()` - if (process.platform == "win32") { + if (isWindows) { try { process.kill(this.shellProcess.pid) } catch(e) {