Skip to content

Commit

Permalink
fix: #7351, display less errors with location and error message
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Jul 24, 2020
1 parent 609e37a commit d1cb405
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/meta/build.js
Expand Up @@ -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);
}

Expand Down
3 changes: 2 additions & 1 deletion src/meta/minifier.js
Expand Up @@ -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 ? [
Expand Down

0 comments on commit d1cb405

Please sign in to comment.