-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
When I use a function as condition, stream never ends. An example probably works best.
In this case, everything ends up in dist, and stream ends.
gulp.task('copy', function() {
return gulp
.src('path/to/stuff')
.pipe(gulpif(false, fail())
.pipe(gulp.dest('dist');
});So in console you see:
Staring 'copy'...
Finished 'copy' after 4ms
In the function case everything still ends up in dist, but stream doesn't end.
function returnfalse() { return false }
gulp.task('copy', function() {
return gulp
.src('path/to/stuff')
.pipe(gulpif(returnfalse, fail())
.pipe(gulp.dest('dist');
});In console you see:
Starting 'copy'...
[process exits]
Obviously this is an issue because we need the stream to end for other tasks to know it completed (it can't be a dependency task otherwise).
Am I doing something wrong? It seems like these cases should behave identically.
Metadata
Metadata
Assignees
Labels
No labels