eg: exit like others if headless and no login data given
This commit is contained in:
parent
66694d65e5
commit
b0f662479d
1 changed files with 5 additions and 0 deletions
|
|
@ -89,6 +89,11 @@ try {
|
||||||
} else {
|
} else {
|
||||||
console.log('Waiting for you to login in the browser.');
|
console.log('Waiting for you to login in the browser.');
|
||||||
notify('epic-games: no longer signed in and not enough options set for automatic login.');
|
notify('epic-games: no longer signed in and not enough options set for automatic login.');
|
||||||
|
if (cfg.headless) {
|
||||||
|
console.log('Run `SHOW=1 node epic-games` to login in the opened browser.');
|
||||||
|
await context.close(); // finishes potential recording
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
await page.waitForURL(URL_CLAIM);
|
await page.waitForURL(URL_CLAIM);
|
||||||
if (!cfg.debug) context.setDefaultTimeout(cfg.timeout);
|
if (!cfg.debug) context.setDefaultTimeout(cfg.timeout);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue