gulp-header: Crashes when the source file doesn't physically exist
Affects: v1.8.3
When a file in the stream doesn’t exist on disk (quite a common scenario in a Gulp pipeline), gulp-header crashes
because the path can’t be found.
I tracked the issue down to https://github.com/tracker1/gulp-header/commit/7feb21151e9101baa47a5ce61d3d6dbc7b975b08#diff-168726dbe96b3ce427e7fedce31bb0bcR38
I guess it should be enough to simply check for existence of the file:
if (fs.existsSync(file.path) && fs.lstatSync(file.path).isDirectory())
works for my use case.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 16
- Comments: 21 (2 by maintainers)
Merge and deploy
1.8.4
, no need to worry about the commit history being rebased, just fix it.There are a large number of broken builds out there and you’re going to end up with a large number of users pinning their version at
1.8.2
, meaning any critical fixes will no longer be deployed to these installs.I hate to state the obvious, but this is rapidly becoming a very urgent issue. Any chance this will be patched by Monday?
+1
You can temporarily add this you your package.json devDependencies to fix the issue
“gulp-header”: “1.8.2”
+1
Yes, please fix
+1
++++++++1
+1
+1
Tried this morning. This is still an issue for us. Did you publish the fix to npm?