fix: exit process with non-zero code on error

pull/136/head
Evan You 4 years ago
parent 241e71000d
commit fb09f8e638

@ -22,13 +22,16 @@ if (!command || command === 'dev') {
})
.catch((err) => {
console.error(chalk.red(`failed to start server. error:\n`), err)
process.exit(1)
})
} else if (command === 'build') {
require('../dist/node')
.build(argv)
.catch((err) => {
console.error(chalk.red(`build error:\n`), err)
process.exit(1)
})
} else {
console.log(chalk.red(`unknown command "${command}".`))
process.exit(1)
}

Loading…
Cancel
Save