Skip to content

Commit

Permalink
fix: ensure file
Browse files Browse the repository at this point in the history
  • Loading branch information
momei.lu authored and IFreeOvO committed Feb 18, 2025
1 parent 459f64a commit f0fb053
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/i18n-extract-cli/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ function isValidInput(input: string): boolean {

function getSourceFilePaths(input: string, exclude: string[]): string[] {
if (isValidInput(input)) {
return glob.sync(`${input}/**/*.{cjs,mjs,js,ts,tsx,jsx,vue}`, {
ignore: exclude,
})
return glob
.sync(`${input}/**/*.{cjs,mjs,js,ts,tsx,jsx,vue}`, {
ignore: exclude,
})
.filter((file) => fs.statSync(file).isFile())
} else {
return []
}
Expand Down

0 comments on commit f0fb053

Please sign in to comment.