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

This commit is contained in:
Cheng Zhao 2021-03-07 16:30:43 +09:00 committed by GitHub
parent f114dcfd6e
commit b3a0743121
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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') });
}
});