Skip to content

Commit

Permalink
Prevent stream’s unhandled exception from being suppressed by Promise,
Browse files Browse the repository at this point in the history
…fixes #32
  • Loading branch information
w0rm committed May 25, 2015
1 parent 9a93d53 commit 42d851c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ return gulp.src('./src/*.css')

## Changelog

* 5.1.8
* Prevent stream’s unhandled exception from being suppressed by Promise

* 5.1.7
* Updated direct dependencies

Expand Down
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ module.exports = function (processors, options) {
error = error.message + error.showSourceCode()
errorOptions.showStack = false
}
cb(new gutil.PluginError('gulp-postcss', error))
// Prevent stream’s unhandled exception from
// being suppressed by Promise
setImmediate(function () {
cb(new gutil.PluginError('gulp-postcss', error))
})
}

}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gulp-postcss",
"version": "5.1.7",
"version": "5.1.8",
"description": "PostCSS gulp plugin",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 42d851c

Please sign in to comment.