diff --git a/lib/commands/db.js b/lib/commands/db.js index de0cab86..c68955d7 100644 --- a/lib/commands/db.js +++ b/lib/commands/db.js @@ -32,7 +32,7 @@ function executeDB (internals, config, callback) { db.close(); if (typeof callback === 'function') callback(err); - else process.exit(1); + else process.exit(err ? 1 : 0); } ); } else if (internals.mode === 'drop') { @@ -51,7 +51,7 @@ function executeDB (internals, config, callback) { db.close(); if (typeof callback === 'function') callback(err); - process.exit(1); + else process.exit(err ? 1 : 0); } ); }