-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors should emit error event #845
Comments
If you emit an gulpSass.logError = function logError(error) {
throw new PluginError('sass', error.messageFormatted);
}; |
To @agarzola and @cdfa: THANK YOU! I've been troubleshooting my gulp workflow all day, finally deciding to try to fix an issue that has been plaguing us for over a year! The watch task just hangs whenever there is a sass compilation error, and must be restarted. I've tried everything else, but throwing an error or EDIT: It does seem like in one of my attempts, EDIT2: While throwing an error allows my watch task to continue working, EDIT3: Passing the export function styles( done ) {
return gulp.src( src )
.pipe( plumber( errorHandler ) )
.pipe( sass.sync().on( 'error', done ) )
.pipe( gulp.dest( dest );
} |
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?
The text was updated successfully, but these errors were encountered: