From 57505348c1a71a262721754e24aa560fbfbf8881 Mon Sep 17 00:00:00 2001 From: toptalo Date: Thu, 8 Aug 2019 17:14:42 +0300 Subject: [PATCH 1/2] Change error output source --- tasks/sass.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tasks/sass.js b/tasks/sass.js index 045dce0..173acc6 100644 --- a/tasks/sass.js +++ b/tasks/sass.js @@ -36,6 +36,8 @@ module.exports = grunt => { grunt.file.write(filePath, result.map); } })); - })().catch(grunt.fatal).then(done); + })().catch(error => { + grunt.fatal(error.formatted); + }).then(done); }); }; From b3576281d6af85f86b86e1a625a9ca2f54211da0 Mon Sep 17 00:00:00 2001 From: toptalo Date: Tue, 13 Aug 2019 10:14:10 +0300 Subject: [PATCH 2/2] Add fallback for non-Sass errors --- tasks/sass.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/sass.js b/tasks/sass.js index 173acc6..a883803 100644 --- a/tasks/sass.js +++ b/tasks/sass.js @@ -37,7 +37,7 @@ module.exports = grunt => { } })); })().catch(error => { - grunt.fatal(error.formatted); + grunt.fatal(error.formatted || error); }).then(done); }); };