From a2e6f54285ce0b10eb73116363c660660b49febc Mon Sep 17 00:00:00 2001 From: Kevin Choi Date: Tue, 22 Dec 2020 16:03:18 -0500 Subject: [PATCH] Fix build error; allow errors to be reported in worker mode. This addresses #127 and #96. --- sass/sass_wrapper.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sass/sass_wrapper.js b/sass/sass_wrapper.js index 88271a5..ece92b8 100644 --- a/sass/sass_wrapper.js +++ b/sass/sass_wrapper.js @@ -17,7 +17,11 @@ const fs = require('fs'); const args = process.argv.slice(2); if (runAsWorker(args)) { debug('Starting Sass compiler persistent worker...'); - runWorkerLoop(args => sass.cli_pkg_main_0_(args)); + runWorkerLoop(args => + sass.cli_pkg_main_0_(args) + .then(() => true) + .catch(() => false) + ); // Note: intentionally don't process.exit() here, because runWorkerLoop // is waiting for async callbacks from node. } else {