Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
case '--squirrel-uninstall':
// Undo anything you did in the --squirrel-install and
// --squirrel-updated handlers
// Remove desktop and start menu shortcuts
spawnUpdate(['--removeShortcut', exeName]);
setTimeout(app.quit, 1000);
return true;
case '--squirrel-obsolete':
// This is called on the outgoing version of your app before
// we update to the new version - it's the opposite of
// --squirrel-updated
app.quit();
return true;
}
}
app.on('window-all-closed', function() {
if (process.platform != 'darwin')
app.quit()
})
// This method will be called when Electron has done everything
app.on('window-all-closed', () => {
// On OS X it is common for applications and their menu bar
// to stay active until the user quits explicitly with Cmd + Q
if (process.platform !== 'darwin') {
app.quit();
}
});
app.on('window-all-closed', () => {
// if (process.platform !== 'darwin') { app.quit(); }
app.quit();
});
app.on('window-all-closed', function() {
if(process.platform !== 'darwin') { app.quit(); }
});
click: () => {
app.quit();
},
},
app.win.on('closed', () => {
win = null
app.quit()
})
}
try {
await verifyAndInstall(updateFilePath, version, logger);
installing = true;
} catch (error) {
logger.info(
'checkDownloadAndInstall: showing general update failure dialog...'
);
await showCannotUpdateDialog(getMainWindow(), messages);
throw error;
}
markShouldQuit();
app.quit();
} catch (error) {
logger.error('checkDownloadAndInstall: error', getPrintableError(error));
} finally {
isChecking = false;
}
}
ipcMain.on('app.relaunch', () => {
app.relaunch();
app.quit();
});
function checkQuit() {
if (allWindowClosed && pendingTasks == 0) app.quit();
}