Skip to content

Commit

Permalink
fix(db): set exit code as 1 only on error
Browse files Browse the repository at this point in the history
Signed-off-by: Christian <pc-jedi@users.noreply.github.com>
  • Loading branch information
pc-jedi committed Jul 5, 2018
1 parent fb75330 commit 3148cc9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/commands/db.js
Expand Up @@ -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') {
Expand All @@ -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);
}
);
}
Expand Down

0 comments on commit 3148cc9

Please sign in to comment.