diff --git a/scripts/updatedb.js b/scripts/updatedb.js index ade24afb..80c36090 100644 --- a/scripts/updatedb.js +++ b/scripts/updatedb.js @@ -177,7 +177,7 @@ function check(database, cb) { console.log(chalk.red('ERROR') + response.data); console.log(chalk.red('ERROR') + ': HTTP Request Failed [%d %s]', status, http.STATUS_CODES[status]); client.abort(); - process.exit(); + process.exit(1); } let str = ''; @@ -200,7 +200,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); }); @@ -229,7 +229,7 @@ function fetch(database, cb) { if (status !== 200) { console.error(chalk.red('ERROR') + ': HTTP Request Failed [%d %s]', status, http.STATUS_CODES[status]); client.abort(); - process.exit(); + process.exit(1); } let tmpFilePipe; diff --git a/test/geo-lookup.js b/test/geo-lookup.js index 77446327..94379b08 100644 --- a/test/geo-lookup.js +++ b/test/geo-lookup.js @@ -7,7 +7,7 @@ if (process.argv.length > 2) { console.dir(geoIp2.lookup(process.argv[2])); const t3 = +new Date(); console.log('Startup: %dms, exec: %dms', t2 - t1, t3 - t2); - process.exit(); + process.exit(1); } const f = [];