Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(build): explicitly exit process after build to prevent hangup (#1530
)

Co-authored-by: Divyansh Singh <40380293+brc-dd@users.noreply.github.com>
  • Loading branch information
NelsonYong and brc-dd committed Oct 24, 2022
1 parent 63f6381 commit 09fcc46
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -12,3 +12,4 @@ pnpm-global
TODOs.md
.temp
*.tgz
examples-temp
12 changes: 8 additions & 4 deletions src/node/cli.ts
Expand Up @@ -28,10 +28,14 @@ if (!command || command === 'dev') {
process.exit(1)
})
} else if (command === 'build') {
build(root, argv).catch((err) => {
console.error(c.red(`build error:\n`), err)
process.exit(1)
})
build(root, argv)
.then(() => {
process.exit()
})
.catch((err) => {
console.error(c.red(`build error:\n`), err)
process.exit(1)
})
} else if (command === 'serve') {
serve(argv).catch((err) => {
console.error(c.red(`failed to start server. error:\n`), err)
Expand Down

0 comments on commit 09fcc46

Please sign in to comment.