Skip to content

fastGlob('\\!dir/*') finds nothing even though a directory named !dir exists #261

Closed

Description

@thorn0

Environment

  • OS Version: WSL (10.0.18363.657) Ubuntu 18.04.1 LTS
  • Node.js Version: v10.15.0

Actual behavior

Nothing found.

Expected behavior

Files found.

Steps to reproduce

  1. Create a non-empty dir named !dir
  2. Run the code sample below

Code sample

console.log(require("fast-glob").sync("\\!dir/*"))

Activity

  1. thorn0 commented on Feb 26, 2020

    @thorn0
    Author

    Workaround: require("fast-glob").sync("@(!)dir/*")

  2. self-assigned this
    on Feb 26, 2020
  3. mrmlnc commented on Feb 26, 2020

    @mrmlnc
    Owner

    Looks like the problem around the glob-parent package. The first part of the pattern is defined as the base directory.

    { pattern: '\\!dir/*', base: '\\!dir' }
    
  4. anthonytranDev commented on Mar 19, 2020

    @anthonytranDev

    @thorn0

    Hey are you still working on this ticket. Was wondering whether I can help out?

    Wanted to ask first - don't want to step over your toes

  5. thorn0 commented on Mar 19, 2020

    @thorn0
    Author

    I'm not working on it. It was just a bug report.

  6. mrmlnc commented on Mar 21, 2020

    @mrmlnc
    Owner

    I created a pull request to fix this problem in the glob-parent package (gulpjs/glob-parent#26).

    @thorn0 & @anthonytranDev, please tell me in which case you are use ! in the directory name?

  7. mrmlnc commented on Mar 22, 2020

    @mrmlnc
    Owner

    Fixed by glob-parent@5.1.1.

    In the simplest case, run this command to get the latest versions of dependencies:

    npm i fast-glob
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions