diff --git a/epic-games.js b/epic-games.js index db37414..6983fa4 100644 --- a/epic-games.js +++ b/epic-games.js @@ -89,6 +89,11 @@ try { } else { 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.'); + 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); if (!cfg.debug) context.setDefaultTimeout(cfg.timeout);