From 8a0cb2602b75bbab70d1396d367937c9188d16a8 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Fri, 18 Jun 2021 08:44:40 -0400 Subject: [PATCH] ClusterStore.storedKubeConfigFolder should be usabled everywhere (#3105) 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 1a39f201c0..26f0e24370 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"; @@ -114,7 +114,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 {