Skip to content

Commit cb03701

Browse files
authored
process.exit when connection fails (#243)
1 parent caf684b commit cb03701

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/cli-repl/src/cli-repl.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class CliRepl {
6868
this.setupRepl(driverUri, driverOptions).catch((error) => {
6969
this.bus.emit('mongosh:error', error);
7070
console.log(formatError(error));
71-
return;
71+
return process.exit();
7272
});
7373
}
7474
}
@@ -362,7 +362,7 @@ class CliRepl {
362362
this.setupRepl(driverUri, driverOptions).catch((e) => {
363363
this.bus.emit('mongosh:error', e);
364364
console.log(formatError(e));
365-
return;
365+
return process.exit();
366366
});
367367
});
368368
}

0 commit comments

Comments
 (0)