Skip to content

Commit 13696b3

Browse files
hanslfilipesilva
authored andcommitted
ci: add support for async scripts
1 parent f48a532 commit 13696b3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

bin/devkit-admin

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,13 @@ try {
6464

6565

6666
try {
67-
require(scriptPath).default(args, logger);
67+
Promise.resolve()
68+
.then(() => require(scriptPath).default(args, logger))
69+
.then(exitCode => process.exit(exitCode || 0))
70+
.catch(err => {
71+
logger.fatal(err.stack);
72+
process.exit(99);
73+
});
6874
} catch (err) {
6975
logger.fatal(err.stack);
7076
process.exit(99);

0 commit comments

Comments
 (0)