Skip to content

Commit 1f9f2ef

Browse files
committed
Merge pull request #42 from postcss/32-show-unhandled-exception
Prevent stream’s unhandled exception from being suppressed by Promise…
2 parents 9a93d53 + 42d851c commit 1f9f2ef

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ return gulp.src('./src/*.css')
7070

7171
## Changelog
7272

73+
* 5.1.8
74+
* Prevent stream’s unhandled exception from being suppressed by Promise
75+
7376
* 5.1.7
7477
* Updated direct dependencies
7578

index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,11 @@ module.exports = function (processors, options) {
7373
error = error.message + error.showSourceCode()
7474
errorOptions.showStack = false
7575
}
76-
cb(new gutil.PluginError('gulp-postcss', error))
76+
// Prevent stream’s unhandled exception from
77+
// being suppressed by Promise
78+
setImmediate(function () {
79+
cb(new gutil.PluginError('gulp-postcss', error))
80+
})
7781
}
7882

7983
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gulp-postcss",
3-
"version": "5.1.7",
3+
"version": "5.1.8",
44
"description": "PostCSS gulp plugin",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)