Skip to content

Commit

Permalink
exit failed process with non-null value to signal failure (geoip-lite…
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrimolet authored and Trallp committed Mar 6, 2024
1 parent 447c066 commit b5e5c40
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 b5e5c40

Please sign in to comment.