Skip to content

fix: Error when "()" is included in windos path #832

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

codelzb
Copy link

@codelzb codelzb commented Feb 28, 2025

close #822

Description

Error when "()" is included in Windows path (The "()" in the macOs path is normal)

Linked Issues

#822

Additional context

Fixed a bug that contained parentheses in the win path
@codelzb codelzb requested a review from antfu as a code owner February 28, 2025 03:08
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.


const debug = Debug('unplugin-vue-components:glob')

export function searchComponents(ctx: Context) {
debug(`started with: [${ctx.options.globs.join(', ')}]`)
const root = ctx.root
// Fixed a bug that contained parentheses in the win path https://github.com/unplugin/unplugin-vue-components/issues/822
if (platform() === 'win32') {
ctx.options.globs = ctx.options.globs.map((dir) => fg.convertPathToPattern(dir))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does the fg come from? Did you test it?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

项目目录存在英文括号(),AutoComponents本地运行异常
2 participants