From 4169ff83afbd29dfde50a7d68456170dc4b3d363 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=9D=E6=99=A8=E5=85=89?= <2293885211@qq.com> Date: Fri, 22 Apr 2022 11:18:11 +0800 Subject: [PATCH] fix: vitepress build hangs after a successful build #562 --- src/node/cli.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/node/cli.ts b/src/node/cli.ts index 0a2cf4fb..25b661c6 100644 --- a/src/node/cli.ts +++ b/src/node/cli.ts @@ -24,7 +24,9 @@ if (!command || command === 'dev') { process.exit(1) }) } else if (command === 'build') { - build(root, argv).catch((err) => { + build(root, argv).then(() => { + process.exit(0) + }).catch((err) => { console.error(chalk.red(`build error:\n`), err) process.exit(1) })