From b0f662479d9c057ecb2a1a5ab0a14722cc772abd Mon Sep 17 00:00:00 2001 From: Ralf Vogler Date: Wed, 22 Feb 2023 00:16:19 +0100 Subject: [PATCH] eg: exit like others if headless and no login data given --- epic-games.js | 5 +++++ 1 file changed, 5 insertions(+) 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);