ClusterStore.storedKubeConfigFolder should be usabled everywhere (#3105)

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-06-18 08:44:40 -04:00
1 parent 7f51e3addd
commit 8a0cb2602b
1 file changed
+2 -2
+2 -2
View File
@@ -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";
@@ -114,7 +114,7 @@ export class ClusterStore extends BaseStore<ClusterStoreModel> {
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 {