Skip to content

Commit 09fcc46

Browse files
NelsonYongbrc-dd
andauthoredOct 24, 2022
fix(build): explicitly exit process after build to prevent hangup (#1530)
Co-authored-by: Divyansh Singh <40380293+brc-dd@users.noreply.github.com>
1 parent 63f6381 commit 09fcc46

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed
 

‎.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ pnpm-global
1212
TODOs.md
1313
.temp
1414
*.tgz
15+
examples-temp

‎src/node/cli.ts

+8-4
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,14 @@ if (!command || command === 'dev') {
2828
process.exit(1)
2929
})
3030
} else if (command === 'build') {
31-
build(root, argv).catch((err) => {
32-
console.error(c.red(`build error:\n`), err)
33-
process.exit(1)
34-
})
31+
build(root, argv)
32+
.then(() => {
33+
process.exit()
34+
})
35+
.catch((err) => {
36+
console.error(c.red(`build error:\n`), err)
37+
process.exit(1)
38+
})
3539
} else if (command === 'serve') {
3640
serve(argv).catch((err) => {
3741
console.error(c.red(`failed to start server. error:\n`), err)

0 commit comments

Comments
 (0)
Please sign in to comment.