Skip to content

Commit 4bc90ae

Browse files
committed
fix: normalize filepath
1 parent f46a681 commit 4bc90ae

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/core/enum.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,11 @@ export function scanEnums(options: ScanOptions): EnumData {
211211
*/
212212
export function scanFiles(options: ScanOptions): string[] {
213213
if (options.scanMode === 'fs') {
214-
return fg.sync(options.scanPattern, {
215-
cwd: options.scanDir,
216-
absolute: true,
217-
})
214+
return fg
215+
.sync(options.scanPattern, {
216+
cwd: options.scanDir,
217+
})
218+
.map((file) => path.resolve(options.scanDir, file))
218219
} else {
219220
const { stdout, stderr, exitCode } = execaSync(
220221
'git',

0 commit comments

Comments
 (0)