test: exit after app.relaunch is called (#28031)

Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
This commit is contained in:
trop[bot]
2021-03-07 19:45:31 +09:00
committed by GitHub
parent f8df8ea9d5
commit 174e939b26
3 changed files with 10 additions and 9 deletions

View File

@@ -14,10 +14,9 @@ app.whenReady().then(() => {
client.end(String(lastArg === '--second'));
});
client.once('end', () => {
if (lastArg !== '--second') {
app.relaunch({ args: process.argv.slice(1).concat('--second') });
}
app.exit(0);
});
if (lastArg !== '--second') {
app.relaunch({ args: process.argv.slice(1).concat('--second') });
}
});