From 7d1d0f073bad80888b2ce30a2ac03ee6e834e367 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Fri, 18 Jun 2021 08:25:42 -0400 Subject: [PATCH] ClusterStore.storedKubeConfigFolder should be usabled everywhere Signed-off-by: Sebastian Malton --- src/common/cluster-store.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/cluster-store.ts b/src/common/cluster-store.ts index 01ff9b3fa1..b11b15628d 100644 --- a/src/common/cluster-store.ts +++ b/src/common/cluster-store.ts @@ -20,7 +20,7 @@ */ import path from "path"; -import { app, ipcMain, ipcRenderer, webFrame } from "electron"; +import { app, ipcMain, ipcRenderer, remote, webFrame } from "electron"; import { action, comparer, computed, makeObservable, observable, reaction } from "mobx"; import { BaseStore } from "./base-store"; import { Cluster, ClusterState } from "../main/cluster"; @@ -109,7 +109,7 @@ export class ClusterStore extends BaseStore { private static StateChannel = "cluster:state"; static get storedKubeConfigFolder(): string { - return path.resolve(app.getPath("userData"), "kubeconfigs"); + return path.resolve((app ?? remote.app).getPath("userData"), "kubeconfigs"); } static getCustomKubeConfigPath(clusterId: ClusterId = uuid.v4()): string {