Hi! I am triaging an issue with our builds wherein our main Gulp task produces exit code 0 even if there was an error with the Sass plugin. I believe the issue is here:
|
gulpSass.logError = function logError(error) { |
|
const message = new PluginError('sass', error.messageFormatted).toString(); |
|
process.stderr.write(`${message}\n`); |
|
this.emit('end'); |
|
}; |
Instead of this.emit('end'), I believe that the recommended solution is to do this.emit('error'). I realize, however, that this may constitute a breaking change, so I think making this change opt-in might be for the best (default is end, and you can opt-in for error).
I will attempt to address this in a fork and submit a pull request for review, if you would be open to that. Thoughts?
Hi! I am triaging an issue with our builds wherein our main Gulp task produces exit code 0 even if there was an error with the Sass plugin. I believe the issue is here:
gulp-sass/index.js
Lines 174 to 178 in c04bb67
Instead of
this.emit('end'), I believe that the recommended solution is to dothis.emit('error'). I realize, however, that this may constitute a breaking change, so I think making this change opt-in might be for the best (default isend, and you can opt-in forerror).I will attempt to address this in a fork and submit a pull request for review, if you would be open to that. Thoughts?