From 70ca673d965da17a9c46a14e3dda7bed888c0c47 Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Fri, 18 Jun 2021 14:46:00 +0200 Subject: [PATCH] ensure the CLI in watch mode keeps running when on error (#4693) --- src/cli.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/cli.js b/src/cli.js index 39a8a070e..80b590e93 100644 --- a/src/cli.js +++ b/src/cli.js @@ -705,6 +705,13 @@ async function build() { let end = process.hrtime.bigint() console.error('Done in', (end - start) / BigInt(1e6) + 'ms.') }) + .catch((err) => { + if (err.name === 'CssSyntaxError') { + console.error(err.toString()) + } else { + console.error(err) + } + }) } let css = input