Skip to content

Does not match for negative ignore #409

Closed
@zaverden

Description

@zaverden

I have following structure:

data
├── section
│   └── file1.json
└── section_2
    └── file2.json

When I run

glob.sync('**', { ignore: ['!data/section/**'] }

I expect to get [ 'data/section/file1.json' ] but got an empty array.

In a real-world scenario (for similar files structure) I receive a set of project-root globs, but I need to get files from specific section only (without modifying globs). That's why I need for negative pattern in ignore

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions