Glob returns an empty stream
See original GitHub issuefilter(glob)
returns an empty stream (no result) in this function (current glob doesn’t work):
gulp.task('views', function() {
return gulp.src('source/views/**/*.jade')
.pipe(filter([ '*.jade', '!{_*.jade,includes/**,_backup/**}' ]))
.pipe(jade())
.pipe(gulp.dest('public'))
while a nearly identical function (with a same glob) works well:
gulp.task('views', function() {
return gulp.src('source/views/**/*.jade')
.pipe(filter(function(file) {
var match = multimatch([file.relative], [ '*.jade', '!{_*.jade,includes/**,_backup/**}' ])
if (match.length)
return file
}))
.pipe(jade())
.pipe(gulp.dest('public'))
Am I doing something wrong?
“gulp”: “^3.9.1” “gulp-jade”: “^1.1.0” “gulp-filter”: “^4.0.0”
Issue Analytics
- State:
- Created 7 years ago
- Comments:5
Top Results From Across the Web
Python glob.glob always returns empty list - Stack Overflow
It sounds like the directory you are globbing just doesn't have .zip files in it. As a test to make sure something weird...
Read more >StreamWrapper support for glob() · Issue #9224 - GitHub
glob () doesn't support StreamWrappers. It does surprisingly return an empty array instead of triggering an error or notice when passing a stream...
Read more >src() - gulp.js
name type default
buffer boolean function true
read boolean function true
since date timestamp function
Read more >Class: Dir (Ruby 2.6.3)
Returns true if the named file is an empty directory, false if it is not a directory or non-empty.
Read more >Bug #13276: Dir.glob returns empty array when OS has no ...
The following terminal session demonstrates how Dir.glob returns an empty array when the OS has run out of file handles; whereas File.new raises...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ouh, this simple one line in ChangeLog or GH Released may save so many time for my project 😢.
@sindresorhus it is very easy to miss some detail in big PR. ChangeLog is very important 😦.
@ai in 4.0 a
file.relative
patterns becamepath.relative
by @cb1kenobi pr https://github.com/sindresorhus/gulp-filter/pull/59 Filter now looks into the root of your project, not a currentsrc
of your pipe https://github.com/sindresorhus/gulp-filter/pull/61Can be fixed now by switching back to v3.