From f2b0316a9144cfd8f761c5b54927d310ab5c19c2 Mon Sep 17 00:00:00 2001 From: Thomas Fritsch Date: Sun, 6 Aug 2023 18:39:14 +0200 Subject: [PATCH] fix scss watch tasks broken on syntax error when there is a syntax error in a sass file (theme or core) the npm start command used to hang, forcing the user to stop and restart the task to compile again. this fix allows to keep the start-task watching/compiling even when there is an error : - the error is displayed in terminal - the rest of gulp tasks are not called (no reload in the browser) - the user can edit the scss files to try a fix without the need to stop/restart the `npm start` command --- gulpfile.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index e36894bc9f9..b2c93a1e1ba 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -167,8 +167,7 @@ function compileSass() { file: transformedFile.path, }, ( err, result ) => { if( err ) { - console.log( vinylFile.path ); - console.log( err.formatted ); + callback(err); } else { transformedFile.extname = '.css';