fix(build): explicitly exit process after build to prevent hangup (#1530)

Co-authored-by: Divyansh Singh <40380293+brc-dd@users.noreply.github.com>
pull/1531/head
YongGit 2 years ago committed by GitHub
parent 63f6381554
commit 09fcc46079
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

1
.gitignore vendored

@ -12,3 +12,4 @@ pnpm-global
TODOs.md TODOs.md
.temp .temp
*.tgz *.tgz
examples-temp

@ -28,10 +28,14 @@ if (!command || command === 'dev') {
process.exit(1) process.exit(1)
}) })
} else if (command === 'build') { } else if (command === 'build') {
build(root, argv).catch((err) => { build(root, argv)
console.error(c.red(`build error:\n`), err) .then(() => {
process.exit(1) process.exit()
}) })
.catch((err) => {
console.error(c.red(`build error:\n`), err)
process.exit(1)
})
} else if (command === 'serve') { } else if (command === 'serve') {
serve(argv).catch((err) => { serve(argv).catch((err) => {
console.error(c.red(`failed to start server. error:\n`), err) console.error(c.red(`failed to start server. error:\n`), err)

Loading…
Cancel
Save