Skip to content

Negative glob not working as expected #2275

@plesiecki

Description

@plesiecki

Hello,

I think I noticed issue with negative glob 🤔

Files structures looks like this:

foo/foo.html
bar/bar.html
gulpfile.js

Here goes the task

const {src, dest} = require('gulp');

module.exports.default = () => src(['**/*.html', '!bar/']).pipe(dest('dest'));

After running this task dest dir contains bar.

I expected dest dir not to include bar.

I made repl.it for this issue https://repl.it/@plesiecki/InvolvedIndianredProgramminglanguages. You can reproduce with single click (by clicking green run button at the top of the page). Remember to delete dest directory before you run the task (if it exists)

Gulp 4
Node 10.12.0
Npm 6.4.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions