In node-glob, when there are 0 file matches and the "nonull" option is set, the original glob pattern is emitted with the end event. This behaviour is currently lost in glob-stream because the 'end' event handler just closes the stream.
My use case for this functionality was with gulp: I wanted to pass a file name that didn't exist yet to a gulp plugin. Maybe I shouldn't be doing that! I can currently work around the problem in gulp with the following:
In node-glob, when there are 0 file matches and the "nonull" option is set, the original glob pattern is emitted with the end event. This behaviour is currently lost in glob-stream because the 'end' event handler just closes the stream.
My use case for this functionality was with gulp: I wanted to pass a file name that didn't exist yet to a gulp plugin. Maybe I shouldn't be doing that! I can currently work around the problem in gulp with the following:
gulp.src('./a-file-that-exists', { read : false }) .pipe(rename('the-path-i-want-to-pass-around'))