From 01719fa58e245291e640d5b0bc51cac5a4a3085c Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Thu, 3 Nov 2022 13:03:55 +0530 Subject: [PATCH] revert(#1530): explicitly exit process after build to prevent hangup (#1572) --- src/node/cli.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) 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)