From 379652e22d25f88f1dfa5b56cc15b1480d55f98b Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 26 Dec 2025 11:32:59 -0500 Subject: [PATCH] Fix auto-launch in development mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- main.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 6ea471f..30d6cf2 100644 --- a/main.js +++ b/main.js @@ -774,9 +774,11 @@ ipcMain.handle('set-app-settings', (event, settings) => { // Apply auto-launch setting if (settings.hasOwnProperty('startOnBoot')) { + const isDev = !app.isPackaged; app.setLoginItemSettings({ openAtLogin: settings.startOnBoot, - path: process.execPath + path: process.execPath, + args: isDev ? [app.getAppPath()] : [] }); } @@ -820,9 +822,11 @@ app.whenReady().then(() => { }); // Set auto-launch + const isDev = !app.isPackaged; app.setLoginItemSettings({ openAtLogin: appSettings.startOnBoot, - path: process.execPath + path: process.execPath, + args: isDev ? [app.getAppPath()] : [] }); createMainWindow();