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

Unable to match correctly #426

Closed
lixiaofa opened this issue Oct 10, 2023 · 1 comment
Closed

Unable to match correctly #426

lixiaofa opened this issue Oct 10, 2023 · 1 comment

Comments

@lixiaofa
Copy link

Environment

  • win11
  • node v18.16.0

Actual behavior

return []

Expected behavior

return [sku.vue]

Code sample

import glob from 'fast-glob'
const projectRoot = process.cwd()
const testRoot = path.resolve(projectRoot, 'ssr-testing')
const demoRoot = path.resolve(testRoot, 'cases')
console.log('demoRoot', demoRoot)
    console.log(
      'glob.sync(`${demoRoot}/*.vue`)',
      glob.sync(`${demoRoot}/*.vue`)
    )

image

@mrmlnc
Copy link
Owner

mrmlnc commented Oct 29, 2023

Current behavior is correct.

https://github.com/mrmlnc/fast-glob#how-to-write-patterns-on-windows

Your case works correctly when using the fg.convertPathToPattern method.

@mrmlnc mrmlnc closed this as completed Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants