Fix auto-launch in development mode

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Claude 2025-12-26 11:32:59 -05:00
parent 3b5ef59c32
commit 379652e22d

View file

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