Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #5654 from trufflesuite/impatient-console-child
Browse files Browse the repository at this point in the history
Bug fix: Console child wait for outstanding promises
  • Loading branch information
cliffoo committed Oct 28, 2022
2 parents fdffc80 + 34db5fe commit e1704f3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/core/lib/console-child.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ function main() {
});

runCommand(command, options)
.then(() => process.exit(0))
.then(returnStatus => {
process.exitCode = returnStatus;
return require("@truffle/promise-tracker").waitForOutstandingPromises();
})
.then(() => process.exit())
.catch(error => {
// Perform error handling ourselves.
if (error instanceof TruffleError) {
Expand Down

0 comments on commit e1704f3

Please sign in to comment.