fix: devMode logic

This commit is contained in:
MasterAcnolo
2026-09-10 10:25:03 +02:00
parent 52be9c6b4f
commit e4243a01ae
2 changed files with 4 additions and 4 deletions

View File

@@ -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.

View File

@@ -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);