Skip to content

Async onEnd doesn't run when called after tap #18

@flekschas

Description

@flekschas

When I specify .on('end', callback) after calling tap the event callback will not be fired. One can get around this by specifying the event callback first but I am wondering if this is expected or a bug?

gulp.task('test', function() {
    return gulp.src(paths.css)
        .pipe(doSomething())
        .on('end', tap(function() {
            // this will be executed
            console.log('Tasks done (A)')
        }))
        .pipe(tap(function(file) {
            console.log(file);
        }))
        .on('end', tap(function() {
            // this will not be executed
            console.log('Tasks done (B)')
        }))
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions