fix: #7351, display less errors with location and error message

This commit is contained in:
Barış Soner Uşaklı
2020-07-24 14:54:01 -04:00
parent 609e37a67b
commit d1cb405d86
2 changed files with 3 additions and 2 deletions

View File

@@ -218,7 +218,7 @@ exports.build = function (targets, options, callback) {
},
], function (err) {
if (err) {
winston.error('[build] Encountered error during build step\n' + err.stack ? err.stack : err);
winston.error('[build] Encountered error during build step\n' + (err.stack ? err.stack : err));
return callback(err);
}

View File

@@ -271,7 +271,8 @@ function buildCSS(data, callback) {
javascriptEnabled: true,
}, function (err, lessOutput) {
if (err) {
return callback(err);
// display less parser errors properly
return callback(new Error(String(err)));
}
postcss(data.minify ? [