mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-21 16:38:23 +01:00
if WAVETERM_HOME is set, use that in emain (#859)
This commit is contained in:
parent
718ebb8170
commit
a4bc0fa93b
@ -7,6 +7,8 @@ import path from "path";
|
||||
import { WaveDevVarName, WaveDevViteVarName } from "../frontend/util/isdev";
|
||||
import * as keyutil from "../frontend/util/keyutil";
|
||||
|
||||
const WaveHomeVarName = "WAVETERM_HOME";
|
||||
|
||||
const isDev = !app.isPackaged;
|
||||
const isDevVite = isDev && process.env.ELECTRON_RENDERER_URL;
|
||||
if (isDev) {
|
||||
@ -37,6 +39,10 @@ ipcMain.on("get-host-name", (event) => {
|
||||
|
||||
// must match golang
|
||||
function getWaveHomeDir() {
|
||||
const override = process.env[WaveHomeVarName];
|
||||
if (override) {
|
||||
return override;
|
||||
}
|
||||
return path.join(os.homedir(), isDev ? ".waveterm-dev" : ".waveterm");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user