From b5e5c408cc0f19aa9a8737bc07af4c3e5d2f8d9c Mon Sep 17 00:00:00 2001 From: Maxime Trimolet Date: Tue, 5 Sep 2023 18:09:20 +0200 Subject: [PATCH] exit failed process with non-null value to signal failure (#257) --- scripts/updatedb.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/updatedb.js b/scripts/updatedb.js index 9c1a43d7..662c466b 100644 --- a/scripts/updatedb.js +++ b/scripts/updatedb.js @@ -184,7 +184,7 @@ function check(database, cb) { if (status !== 200) { console.log(chalk.red('ERROR') + ': HTTP Request Failed [%d %s]', status, http.STATUS_CODES[status]); client.abort(); - process.exit(); + process.exit(1); } var str = ""; @@ -207,7 +207,7 @@ function check(database, cb) { console.log(chalk.red('ERROR') + ': Could not retrieve checksum for', database.type, chalk.red('Aborting')); console.log('Run with "force" to update without checksum'); client.abort(); - process.exit(); + process.exit(1); } cb(null, database); }); @@ -245,7 +245,7 @@ function fetch(database, cb) { if (status !== 200) { console.log(chalk.red('ERROR') + ': HTTP Request Failed [%d %s]', status, http.STATUS_CODES[status]); client.abort(); - process.exit(); + process.exit(1); } var tmpFilePipe;