mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
1 parent
b95586df87
commit
6852388145
28 files changed
+642
-204
No files matched your search
@@ -41,7 +41,6 @@ export class KubeAuthProxy {
|
||||
}
|
||||
}
|
||||
})
|
||||
configWatcher.on("error", () => {})
|
||||
const clusterUrl = url.parse(this.cluster.apiUrl)
|
||||
let args = [
|
||||
"proxy",
|
||||
@@ -57,7 +56,9 @@ export class KubeAuthProxy {
|
||||
})
|
||||
this.proxyProcess.on("exit", (code) => {
|
||||
logger.error(`proxy ${this.cluster.contextName} exited with code ${code}`)
|
||||
this.sendIpcLogMessage( `proxy exited with code ${code}`, "stderr").catch((_) => {})
|
||||
this.sendIpcLogMessage( `proxy exited with code ${code}`, "stderr").catch((err: Error) => {
|
||||
logger.debug("failed to send IPC log message: " + err.message)
|
||||
})
|
||||
this.proxyProcess = null
|
||||
configWatcher.close()
|
||||
})
|
||||
|
||||
+5
-4
@@ -9,8 +9,9 @@ import { globalRequestOpts } from "../common/request"
|
||||
import * as lockFile from "proper-lockfile"
|
||||
import { helmCli } from "./helm-cli"
|
||||
import { userStore } from "../common/user-store"
|
||||
import { getBundledKubectlVersion} from "../common/utils/app-version"
|
||||
|
||||
const bundledVersion = require("../../package.json").config.bundledKubectlVersion
|
||||
const bundledVersion = getBundledKubectlVersion()
|
||||
const kubectlMap: Map<string, string> = new Map([
|
||||
["1.7", "1.8.15"],
|
||||
["1.8", "1.9.10"],
|
||||
@@ -194,16 +195,16 @@ export class Kubectl {
|
||||
const file = fs.createWriteStream(this.path)
|
||||
stream.on("complete", () => {
|
||||
logger.debug("kubectl binary download finished")
|
||||
file.end(() => {})
|
||||
file.end()
|
||||
})
|
||||
stream.on("error", (error) => {
|
||||
logger.error(error)
|
||||
fs.unlink(this.path, () => {})
|
||||
fs.unlink(this.path, null)
|
||||
reject(error)
|
||||
})
|
||||
file.on("close", () => {
|
||||
logger.debug("kubectl binary download closed")
|
||||
fs.chmod(this.path, 0o755, () => {})
|
||||
fs.chmod(this.path, 0o755, null)
|
||||
resolve()
|
||||
})
|
||||
stream.pipe(file)
|
||||
|
||||
@@ -159,21 +159,18 @@ export class LensBinary {
|
||||
|
||||
stream.on("complete", () => {
|
||||
logger.info(`Download of ${this.originalBinaryName} finished`)
|
||||
file.end(() => {
|
||||
})
|
||||
file.end()
|
||||
})
|
||||
|
||||
stream.on("error", (error) => {
|
||||
logger.error(error)
|
||||
fs.unlink(binaryPath, () => {
|
||||
})
|
||||
fs.unlink(binaryPath, null)
|
||||
throw(error)
|
||||
})
|
||||
return new Promise((resolve, reject) => {
|
||||
file.on("close", () => {
|
||||
logger.debug(`${this.originalBinaryName} binary download closed`)
|
||||
if (!this.tarPath) fs.chmod(binaryPath, 0o755, () => {
|
||||
})
|
||||
if (!this.tarPath) fs.chmod(binaryPath, 0o755, null)
|
||||
resolve()
|
||||
})
|
||||
stream.pipe(file)
|
||||
|
||||
+6
-6
@@ -78,11 +78,11 @@ export default function initMenu(opts: MenuOptions, promiseIpc: any) {
|
||||
label: 'Add Cluster...',
|
||||
click: opts.addClusterHook,
|
||||
},
|
||||
{
|
||||
label: 'Cluster Settings',
|
||||
click: opts.clusterSettingsHook,
|
||||
enabled: false
|
||||
}
|
||||
{
|
||||
label: 'Cluster Settings',
|
||||
click: opts.clusterSettingsHook,
|
||||
enabled: false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -215,4 +215,4 @@ export default function initMenu(opts: MenuOptions, promiseIpc: any) {
|
||||
promiseIpc.on("disableClusterSettingsMenuItem", () => {
|
||||
setClusterSettingsEnabled(false)
|
||||
});
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user