diff --git a/config.js b/config.js index 15f0b78..5eb260f 100644 --- a/config.js +++ b/config.js @@ -7,7 +7,7 @@ const path = require("path"); * Indicates whether the application is running in development mode. * Determined by Electron's packaging state. */ -const devMode = process.env.NODE_ENV === "test" || !app?.isPackaged; +const devMode = !app.isPackaged || process.env.NODE_ENV === "test"; /** * Resolves the configuration file path depending on runtime environment. diff --git a/main.js b/main.js index 2b4dda4..037ab4a 100644 --- a/main.js +++ b/main.js @@ -38,7 +38,7 @@ app.setAppUserModelId("com.masteracnolo.freedomloader"); * Load the app dependencies for hardware choice */ const { logger, logSessionStart, logSessionEnd, logDir } = require("./server/logger"); -const { configFeatures } = require("./config"); +const { configFeatures, devMode} = require("./config"); /** * In-memory snapshot of application feature flags. @@ -53,7 +53,7 @@ if (!configFeatures.enableHardwareAcceleration){ logger.info("Enable Hardware Acceleration") } -if(configFeatures.devMode){ +if(devMode){ /** * Start devTron extensions - @see https://github.com/electron/devtron */ @@ -135,7 +135,7 @@ app.whenReady().then(async () => { createSplashWindow(); - if (!configFeatures.devMode && !checkNativeDependencies()) return; + if (!devMode && !checkNativeDependencies()) return; const { userYtDlp } = require("./server/helpers/path.helpers"); updateYtDlp(userYtDlp);