From 2ac8beeeb0664b9c1e166cacddd0d0e8bea9b317 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Wed, 22 Sep 2021 19:48:16 +0530 Subject: fix: fix some ts errors --- src/environment.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/environment.ts') diff --git a/src/environment.ts b/src/environment.ts index ca1380199..b51b0aae1 100644 --- a/src/environment.ts +++ b/src/environment.ts @@ -38,15 +38,11 @@ export const ferdiLocale = app.getLocale(); // Set app directory before loading user modules if (process.env.FERDI_APPDATA_DIR != null) { app.setPath('appData', process.env.FERDI_APPDATA_DIR); - app.setPath('userData', join(app.getPath('appData'))); + app.setPath('userData', app.getPath('appData')); } else if (process.env.PORTABLE_EXECUTABLE_DIR != null) { - app.setPath( - 'appData', - process.env.PORTABLE_EXECUTABLE_DIR, - `${app.name}AppData`, - ); + app.setPath('appData', join(process.env.PORTABLE_EXECUTABLE_DIR, `${app.name}AppData`)); app.setPath('userData', join(app.getPath('appData'), `${app.name}AppData`)); -} else if (is.windows) { +} else if (is.windows && process.env.APPDATA != null) { app.setPath('appData', process.env.APPDATA); app.setPath('userData', join(app.getPath('appData'), app.name)); } -- cgit v1.2.3-54-g00ecf