From e161fd2c2f8d2599f85a0888039289e5a489367f Mon Sep 17 00:00:00 2001 From: Lauri Nevala Date: Fri, 4 Sep 2020 07:28:55 +0300 Subject: [PATCH] Clean up Signed-off-by: Lauri Nevala --- src/main/kubectl.ts | 16 ---------------- src/main/shell-session.ts | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/src/main/kubectl.ts b/src/main/kubectl.ts index 91b024e292..afb7a89111 100644 --- a/src/main/kubectl.ts +++ b/src/main/kubectl.ts @@ -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() diff --git a/src/main/shell-session.ts b/src/main/shell-session.ts index 80a55f46db..704d97382a 100644 --- a/src/main/shell-session.ts +++ b/src/main/shell-session.ts @@ -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"