Skip to content

Commit 27c0320

Browse files
authored
Fixed a bug that contained parentheses in the win path
1 parent f5a9e0c commit 27c0320

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/core/fs/glob.ts

+5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
import type { Context } from '../context'
22
import Debug from 'debug'
33
import { globSync } from 'tinyglobby'
4+
import { platform } from 'os'
45

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

78
export function searchComponents(ctx: Context) {
89
debug(`started with: [${ctx.options.globs.join(', ')}]`)
910
const root = ctx.root
11+
// Fixed a bug that contained parentheses in the win path https://github.com/unplugin/unplugin-vue-components/issues/822
12+
if (platform() === 'win32') {
13+
ctx.options.globs = ctx.options.globs.map((dir) => fg.convertPathToPattern(dir))
14+
}
1015
const files = globSync(ctx.options.globs, {
1116
ignore: ctx.options.globsExclude,
1217
onlyFiles: true,

0 commit comments

Comments
 (0)