From 2e87585393a4cc02bd1efa7144f04c940b0cb280 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Fri, 1 Oct 2021 14:19:03 +0530 Subject: refactor: fix issue with env var 'ELECTRON_IS_DEV' being ignored to determine dev-mode --- src/environment.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { app.setPath('userData', join(app.getPath('appData'), app.name)); } -export const isDevMode = !app.isPackaged; +export const isDevMode = process.env.ELECTRON_IS_DEV !== undefined ? Number.parseInt(process.env.ELECTRON_IS_DEV, 10) === 1 : !app.isPackaged; if (isDevMode) { app.setPath('userData', join(app.getPath('appData'), `${app.name}Dev`)); } -- cgit v1.2.3-54-g00ecf