Skip to content

Commit

Permalink
exit failed process with non-null value to signal failure (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrimolet authored Sep 5, 2023
1 parent 1813a6e commit 41d752c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/updatedb.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "";
Expand All @@ -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);
});
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 41d752c

Please sign in to comment.