mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix coping files build step, reuse more common/vars
This commit is contained in:
parent
81c2a75d73
commit
fe1c92c56e
10
package.json
10
package.json
@ -77,7 +77,15 @@
|
|||||||
"afterSign": "build/notarize.js",
|
"afterSign": "build/notarize.js",
|
||||||
"extraResources": [
|
"extraResources": [
|
||||||
{
|
{
|
||||||
"from": "src/(features|static|locales)",
|
"from": "src/locales/",
|
||||||
|
"filter": "**/*.js"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "src/features/",
|
||||||
|
"filter": "**/*"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "static/",
|
||||||
"filter": "**/*"
|
"filter": "**/*"
|
||||||
},
|
},
|
||||||
"LICENSE"
|
"LICENSE"
|
||||||
|
|||||||
@ -65,13 +65,10 @@ export class ShellSession extends EventEmitter {
|
|||||||
switch(path.basename(shell)) {
|
switch(path.basename(shell)) {
|
||||||
case "powershell.exe":
|
case "powershell.exe":
|
||||||
return ["-NoExit", "-command", `& {Set-Location $Env:USERPROFILE; $Env:PATH="${this.kubectlBinDir};${this.helmBinDir};$Env:PATH"}`]
|
return ["-NoExit", "-command", `& {Set-Location $Env:USERPROFILE; $Env:PATH="${this.kubectlBinDir};${this.helmBinDir};$Env:PATH"}`]
|
||||||
break
|
|
||||||
case "bash":
|
case "bash":
|
||||||
return ["--init-file", path.join(this.kubectlBinDir, '.bash_set_path')]
|
return ["--init-file", path.join(this.kubectlBinDir, '.bash_set_path')]
|
||||||
break
|
|
||||||
case "fish":
|
case "fish":
|
||||||
return ["--login", "--init-command", `export PATH="${this.kubectlBinDir}:${this.helmBinDir}:$PATH"; export KUBECONFIG="${this.kubeconfigPath}"`]
|
return ["--login", "--init-command", `export PATH="${this.kubectlBinDir}:${this.helmBinDir}:$PATH"; export KUBECONFIG="${this.kubeconfigPath}"`]
|
||||||
break
|
|
||||||
case "zsh":
|
case "zsh":
|
||||||
return ["--login"]
|
return ["--login"]
|
||||||
default:
|
default:
|
||||||
@ -132,7 +129,7 @@ export class ShellSession extends EventEmitter {
|
|||||||
|
|
||||||
protected pipeStdout() {
|
protected pipeStdout() {
|
||||||
// send shell output to websocket
|
// send shell output to websocket
|
||||||
this.shellProcess.on("data", ((data: string) => {
|
this.shellProcess.onData(((data: string) => {
|
||||||
this.sendResponse(data)
|
this.sendResponse(data)
|
||||||
}).bind(this));
|
}).bind(this));
|
||||||
}
|
}
|
||||||
@ -187,7 +184,7 @@ export class ShellSession extends EventEmitter {
|
|||||||
protected killShellProcess(){
|
protected killShellProcess(){
|
||||||
if(this.running) {
|
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()`
|
// 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 {
|
try {
|
||||||
process.kill(this.shellProcess.pid)
|
process.kill(this.shellProcess.pid)
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user