diff options
author | Vijay A <vraravam@users.noreply.github.com> | 2021-10-01 14:19:03 +0530 |
---|---|---|
committer | Vijay A <vraravam@users.noreply.github.com> | 2021-10-01 14:19:03 +0530 |
commit | 2e87585393a4cc02bd1efa7144f04c940b0cb280 (patch) | |
tree | ea0f7f3fcf1429ff3ce097aea77084b302bc9f2b /src/environment.ts | |
parent | refactor: reduce dependency on 'electron-utils' and 'electron-is-dev' (#2005) (diff) | |
download | ferdium-app-2e87585393a4cc02bd1efa7144f04c940b0cb280.tar.gz ferdium-app-2e87585393a4cc02bd1efa7144f04c940b0cb280.tar.zst ferdium-app-2e87585393a4cc02bd1efa7144f04c940b0cb280.zip |
refactor: fix issue with env var 'ELECTRON_IS_DEV' being ignored to determine dev-mode
Diffstat (limited to 'src/environment.ts')
-rw-r--r-- | src/environment.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/environment.ts b/src/environment.ts index 818577c1f..8110aa816 100644 --- a/src/environment.ts +++ b/src/environment.ts | |||
@@ -51,7 +51,7 @@ if (process.env.FERDI_APPDATA_DIR != null) { | |||
51 | app.setPath('userData', join(app.getPath('appData'), app.name)); | 51 | app.setPath('userData', join(app.getPath('appData'), app.name)); |
52 | } | 52 | } |
53 | 53 | ||
54 | export const isDevMode = !app.isPackaged; | 54 | export const isDevMode = process.env.ELECTRON_IS_DEV !== undefined ? Number.parseInt(process.env.ELECTRON_IS_DEV, 10) === 1 : !app.isPackaged; |
55 | if (isDevMode) { | 55 | if (isDevMode) { |
56 | app.setPath('userData', join(app.getPath('appData'), `${app.name}Dev`)); | 56 | app.setPath('userData', join(app.getPath('appData'), `${app.name}Dev`)); |
57 | } | 57 | } |