Skip to content

Commit

Permalink
fix: build cannot exit (close: #580)
Browse files Browse the repository at this point in the history
  • Loading branch information
ulivz committed Jun 13, 2018
1 parent 5479d6e commit be726e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/vuepress.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ if (!process.argv.slice(2).length) {

function wrapCommand (fn) {
return (...args) => {
return fn(...args).catch(err => {
return fn(...args).then(() => {
process.exit(0)
}).catch(err => {
console.error(chalk.red(err.stack))
})
}
Expand Down

0 comments on commit be726e1

Please sign in to comment.