diff --git a/src/node/cli.ts b/src/node/cli.ts index 1d95c3e7358..0d992fab8e4 100644 --- a/src/node/cli.ts +++ b/src/node/cli.ts @@ -28,14 +28,10 @@ if (!command || command === 'dev') { process.exit(1) }) } else if (command === 'build') { - build(root, argv) - .then(() => { - process.exit() - }) - .catch((err) => { - console.error(c.red(`build error:\n`), err) - process.exit(1) - }) + build(root, argv).catch((err) => { + console.error(c.red(`build error:\n`), err) + process.exit(1) + }) } else if (command === 'serve') { serve(argv).catch((err) => { console.error(c.red(`failed to start server. error:\n`), err)