fix(cli): force exiting after 10 seconds should not change the exit code
If all migrations have been run successfully we want the exit code to be 0 even though we had to force exit the process. This is because on some platforms (e.g. Bun) all handles are not cleaned up the same as in NodeJS, so lets be forgiving.
This commit is contained in:
parent
f720aae83d
commit
61cbcbd691
2 changed files with 6 additions and 1 deletions
|
|
@ -602,5 +602,5 @@ await main(process.argv.slice(2), controller.signal);
|
|||
|
||||
setTimeout(() => {
|
||||
console.error('Process did not exit within 10 seconds, forcing exit');
|
||||
process.exit(1);
|
||||
process.exit(process.exitCode);
|
||||
}, 10_000).unref();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue