sindresorhus / gulp-filter

Filter files in a `vinyl` stream
MIT License
315 stars 37 forks source link

Gulp filter filters everything #87

Open sherlock1982 opened 6 years ago

sherlock1982 commented 6 years ago

Issuehunt badges

Version 5.0.0 works ok, version 5.0.1 broken. Looks like a change was made between 5.0.0 and 5.0.1 and now filter just skips everything. Here's a simplified code snippet which:

function(svn_revision){
    var xmlFilter = filter("../**/*.xml", {restore: true});

    return gulp.src([
            "../Setup/Installed/Data/Http/Templates/**/*",
        ], { base : '../' })
        .pipe(xmlFilter)
        .pipe(replace('@PRODUCT_SVN_BUILD@', svn_revision))
        .pipe(xmlFilter.restore)
        .pipe(gulp.dest("../BinRepo/Templates"));
},

Expected behavior: All xml files should have @PRODUCT_SVN_BUILD@ replaced. Actual behavior: Looks like they're just written to dest folder.

UPD: Looks like 5.0.0 doesn't work on Linux


IssueHunt Summary ### Sponsors (Total: $40.00) - [issuehunt issuehunt](https://issuehunt.io/u/issuehunt) ($40.00) #### [Become a sponsor now!](https://issuehunt.io/r/sindresorhus/gulp-filter/issues/87) #### [Or submit a pull request to get the deposits!](https://issuehunt.io/r/sindresorhus/gulp-filter/issues/87) ### Tips - Checkout the [Issuehunt explorer](https://issuehunt.io/r/sindresorhus/gulp-filter/) to discover more funded issues. - Need some help from other developers? [Add your repositories](https://issuehunt.io/r/new) on IssueHunt to raise funds.
gchamon commented 6 years ago

+1 same here, downgrading

gchamon commented 6 years ago

4 is also broken here, sticking with ~3.0

sergeymorkovkin commented 5 years ago

Version 5.1.0 - broken. Filters out everything.

IssueHuntBot commented 5 years ago

@issuehunt has funded $40.00 to this issue.