diff --git a/epic-games.js b/epic-games.js index aed786d..dff1344 100644 --- a/epic-games.js +++ b/epic-games.js @@ -182,6 +182,7 @@ try { } } catch (error) { console.error(error); // .toString()? + process.exitCode = 1; if (error.message && !error.message.includes('Target closed')) // e.g. when killed by Ctrl-C notify(`epic-games failed: ${error.message.split('\n')[0]}`); } finally { diff --git a/gog.js b/gog.js index 044557c..568fe80 100644 --- a/gog.js +++ b/gog.js @@ -130,6 +130,7 @@ try { } } catch (error) { console.error(error); // .toString()? + process.exitCode = 1; if (error.message && !error.message.includes('Target closed') && !error.message.includes('Browser closed')) // e.g. when killed by Ctrl-C notify(`gog failed: ${error.message.split('\n')[0]}`); } finally { diff --git a/prime-gaming.js b/prime-gaming.js index 1320992..5a3278c 100644 --- a/prime-gaming.js +++ b/prime-gaming.js @@ -162,7 +162,8 @@ try { // await page.screenshot({ path: p, fullPage: true }); await page.locator(games_sel).screenshot({ path: p }); } catch (error) { - console.error('Catch error:', error); // .toString()? + console.error(error); // .toString()? + process.exitCode = 1; if (error.message && !error.message.includes('Target closed')) // e.g. when killed by Ctrl-C notify(`prime-gaming failed: ${error.message.split('\n')[0]}`); } finally {