Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Square brackets in resolved base path leads to matchGlobs in watcher to fails #810

Open
5 tasks done
gamerxp opened this issue Dec 18, 2024 · 0 comments
Open
5 tasks done

Comments

@gamerxp
Copy link

gamerxp commented Dec 18, 2024

Describe the bug

In FiveM you can grouping curtain resource to group by naming the parent directory with surrounded square bracket ([GoodCategoryName])

When full path containing this pattern [Name] It leads to minimatch's matching to fails.

With some digging I've found the plugin will globs with resolve full path with unescaped bracket and passing it to minimatch

C:/Github/Project/[Resource]/ui/src/component/**/*.vue

The [Resource] part will leads to minimatch to fails

Potential fix

  • Maybe escape the square brackets in full path before matching with minimatch

Reproduction

Name the parent directory surrounded by square bracket

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (24) x64 AMD Ryzen 9 5900X 12-Core Processor
    Memory: 37.47 GB / 63.91 GB
  Binaries:
    Node: 22.2.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.11 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 10.9.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 9.15.0 - ~\AppData\Roaming\npm\pnpm.CMD
  Browsers:
    Chrome: 131.0.6778.140
    Edge: Chromium (127.0.2651.74)
    Internet Explorer: 11.0.22621.3527

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
@gamerxp gamerxp changed the title Square brackets in resolved base path leads to watcher not working Square brackets in resolved base path leads to matchGlobs in watcher to fails Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant