1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

ClusterStore.storedKubeConfigFolder should be usabled everywhere (#3105)

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2021-06-18 08:44:40 -04:00 committed by GitHub
parent 7f51e3addd
commit 8a0cb2602b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,7 @@
*/ */
import path from "path"; 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 { action, comparer, computed, makeObservable, observable, reaction } from "mobx";
import { BaseStore } from "./base-store"; import { BaseStore } from "./base-store";
import { Cluster, ClusterState } from "../main/cluster"; import { Cluster, ClusterState } from "../main/cluster";
@ -114,7 +114,7 @@ export class ClusterStore extends BaseStore<ClusterStoreModel> {
private static StateChannel = "cluster:state"; private static StateChannel = "cluster:state";
static get storedKubeConfigFolder(): string { 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 { static getCustomKubeConfigPath(clusterId: ClusterId = uuid.v4()): string {