mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-29 11:03:18 +00:00
16 lines
398 B
TypeScript
16 lines
398 B
TypeScript
import {app} from 'electron';
|
|
import {ALAS_RELAUNCH_ARGV} from '@common/constant/config';
|
|
|
|
export const isRelaunch = process.argv.includes(ALAS_RELAUNCH_ARGV);
|
|
|
|
function relaunchApp() {
|
|
/**
|
|
* TODO Some events need to be rehandled for restart operations
|
|
*/
|
|
if (!isRelaunch) {
|
|
app.relaunch({args: process.argv.slice(1).concat([ALAS_RELAUNCH_ARGV])});
|
|
}
|
|
}
|
|
|
|
export default relaunchApp;
|