1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala 2020-09-04 07:28:55 +03:00
parent 179a9087e5
commit e161fd2c2f
2 changed files with 1 additions and 17 deletions

View File

@ -261,22 +261,6 @@ export class Kubectl {
})
}
protected async scriptIsLatest(scriptPath: string) {
const scriptExists = await pathExists(scriptPath)
if (!scriptExists) return false
try {
const filehandle = await fs.promises.open(scriptPath, 'r')
const buffer = Buffer.alloc(40)
await filehandle.read(buffer, 0, 40, 0)
await filehandle.close()
return buffer.toString().startsWith(initScriptVersionString)
} catch (err) {
logger.error(err)
return false
}
}
protected async writeInitScripts() {
const kubectlPath = userStore.preferences?.downloadKubectlBinaries ? this.dirname : path.dirname(this.getPathFromPreferences())
const helmPath = helmCli.getBinaryDir()

View File

@ -4,7 +4,7 @@ import { EventEmitter } from "events";
import path from "path"
import shellEnv from "shell-env"
import { app } from "electron"
import { Kubectl, bundledKubectl } from "./kubectl"
import { Kubectl } from "./kubectl"
import { Cluster } from "./cluster"
import { ClusterPreferences } from "../common/cluster-store";
import { helmCli } from "./helm/helm-cli"