fix portable app restart

This commit is contained in:
Araxeus
2022-02-24 20:41:59 +02:00
parent 407887254f
commit 704fba9aba
5 changed files with 12 additions and 24 deletions

View File

@ -14,6 +14,7 @@ module.exports.setupAppControls = () => {
}
function restart() {
app.relaunch();
app.exit();
app.relaunch({ execPath: process.env.PORTABLE_EXECUTABLE_FILE });
// execPath will be undefined if not running portable app, resulting in default behavior
app.quit();
}