From 935a9e04a5a20f0ebe445faee9f8083f86d45f76 Mon Sep 17 00:00:00 2001 From: Alex Andreev Date: Thu, 3 Sep 2020 15:04:03 +0300 Subject: [PATCH] Showing default kubectl binary path Signed-off-by: Alex Andreev --- src/common/user-store.ts | 4 ++-- src/renderer/components/+preferences/kubectl-binaries.tsx | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/common/user-store.ts b/src/common/user-store.ts index ef72fd72bf..a0cfe09fd5 100644 --- a/src/common/user-store.ts +++ b/src/common/user-store.ts @@ -59,8 +59,8 @@ export class UserStore extends BaseStore { colorTheme: UserStore.defaultTheme, downloadMirror: "default", downloadKubectlBinaries: true, // Download kubectl binaries matching cluster version - downloadBinariesPath: "", - kubectlBinariesPath: "$PATH/kubectl" + downloadBinariesPath: this.getDefaultKubectlPath(), + kubectlBinariesPath: "" }; get isNewVersion() { diff --git a/src/renderer/components/+preferences/kubectl-binaries.tsx b/src/renderer/components/+preferences/kubectl-binaries.tsx index bbe55ed7b0..2917b32bbd 100644 --- a/src/renderer/components/+preferences/kubectl-binaries.tsx +++ b/src/renderer/components/+preferences/kubectl-binaries.tsx @@ -6,6 +6,7 @@ import { Input } from '../input'; import { SubTitle } from '../layout/sub-title'; import { UserPreferences, userStore } from '../../../common/user-store'; import { observer } from 'mobx-react'; +import { Kubectl } from '../../../main/kubectl'; export const KubectlBinaries = observer(({ preferences }: { preferences: UserPreferences }) => { const [downloadPath, setDownloadPath] = useState(preferences.downloadBinariesPath || ""); @@ -31,7 +32,7 @@ export const KubectlBinaries = observer(({ preferences }: { preferences: UserPre onBlur={save} /> - Default: $PATH/kubectl + Default:{" "}{Kubectl.bundledKubectlPath} );