mirror of
https://github.com/0O0o0oOoO00/Alas.git
synced 2026-05-16 08:19:27 +08:00
17 lines
383 B
TypeScript
17 lines
383 B
TypeScript
import {app} from 'electron';
|
|
import {isMacintosh} from '@common/utils/env';
|
|
|
|
export const isRelaunch = process.argv.includes('relaunch');
|
|
|
|
function relaunchApp() {
|
|
/**
|
|
* TODO Some events need to be rehandled for restart operations
|
|
*/
|
|
if (!isRelaunch) {
|
|
app.relaunch({args: ['relaunch']});
|
|
isMacintosh ? app.quit() : app.exit(0);
|
|
}
|
|
}
|
|
|
|
export default relaunchApp;
|