Skip to content

File path after negative glob causes 'File not found with singular glob' #138

Description

@curvedriver

What actually happened?

A ' File not found with singular glob' error will be thrown if a file path will be defined after a negative glob.

That's a regression to 6.1.0 and it seems that this issue is caused by the fact that anymatch#matchPatterns function just returns the index of the patterns array which does not include the negative patterns.

Therefore ourGlobs[matchIdx] returns the wrong glob.

Please give us a sample of your gulpfile

I added two tests at my fork:
-https://github.com/curvedriver/glob-stream/pull/1/files

  1. file path before negative glob works as expected
  2. file path after negative glob throws the mentioned Error: File not found with singular glob:

See:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions