Skip to content

Commit 3148cc9

Browse files
committed
fix(db): set exit code as 1 only on error
Signed-off-by: Christian <pc-jedi@users.noreply.github.com>
1 parent fb75330 commit 3148cc9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/commands/db.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function executeDB (internals, config, callback) {
3232

3333
db.close();
3434
if (typeof callback === 'function') callback(err);
35-
else process.exit(1);
35+
else process.exit(err ? 1 : 0);
3636
}
3737
);
3838
} else if (internals.mode === 'drop') {
@@ -51,7 +51,7 @@ function executeDB (internals, config, callback) {
5151

5252
db.close();
5353
if (typeof callback === 'function') callback(err);
54-
process.exit(1);
54+
else process.exit(err ? 1 : 0);
5555
}
5656
);
5757
}

0 commit comments

Comments
 (0)