From fb09f8e638c06aec32494f731554fb1b989daaf0 Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 19 Nov 2020 13:05:54 -0500 Subject: [PATCH] fix: exit process with non-zero code on error --- bin/vitepress.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/vitepress.js b/bin/vitepress.js index 836c46e4d569..fe81330ffdd9 100755 --- a/bin/vitepress.js +++ b/bin/vitepress.js @@ -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) }