Skip to content

**/* seems to be getting the wrong regex #6

Description

@mnakalay

Hello,

I am using globrex in the context of your other package tiny-glob and I think the regex generated is not correct for nested folders.

For instance I have this !(**/*.{sh,bash,bat,bin,exe,msi})

This should exclude any file with those extensions in any folder but what I'm getting instead is that it only excludes the files one folder down so for instance it will exclude /somefolder/somefile.sh but it will not exclude /somefolder/someotherfolder/somefile.sh

If I modify it to have !(**/**/*.{sh,bash,bat,bin,exe,msi}) it then removes the files only 2 folders down

So it seems instead of taking the first ** as meaning any number of nested folders, it is taking it as just one level

Thank you

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions