mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Clean up
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
parent
179a9087e5
commit
e161fd2c2f
@ -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() {
|
protected async writeInitScripts() {
|
||||||
const kubectlPath = userStore.preferences?.downloadKubectlBinaries ? this.dirname : path.dirname(this.getPathFromPreferences())
|
const kubectlPath = userStore.preferences?.downloadKubectlBinaries ? this.dirname : path.dirname(this.getPathFromPreferences())
|
||||||
const helmPath = helmCli.getBinaryDir()
|
const helmPath = helmCli.getBinaryDir()
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import { EventEmitter } from "events";
|
|||||||
import path from "path"
|
import path from "path"
|
||||||
import shellEnv from "shell-env"
|
import shellEnv from "shell-env"
|
||||||
import { app } from "electron"
|
import { app } from "electron"
|
||||||
import { Kubectl, bundledKubectl } from "./kubectl"
|
import { Kubectl } from "./kubectl"
|
||||||
import { Cluster } from "./cluster"
|
import { Cluster } from "./cluster"
|
||||||
import { ClusterPreferences } from "../common/cluster-store";
|
import { ClusterPreferences } from "../common/cluster-store";
|
||||||
import { helmCli } from "./helm/helm-cli"
|
import { helmCli } from "./helm/helm-cli"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user