Skip to content

Commit

Permalink
fix(cli): fix read function name error in windows (#1527)
Browse files Browse the repository at this point in the history
  • Loading branch information
skyoct authored Sep 12, 2023
1 parent 6b463f0 commit 32d2121
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli/src/action/function/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ function getLocalFunction(dir: string, prefix: string): string[] {
funcNames.push(...getLocalFunction(filePath, path.join(prefix || '', file)))
}
if (stat.isFile() && file.endsWith('.ts')) {
funcNames.push(path.join(prefix || '', file).replace(/\.ts$/, ''))
funcNames.push(path.join(prefix || '', file).replace(/\\/g, '/').replace(/\.ts$/, ''))
}
})
return funcNames
Expand Down

0 comments on commit 32d2121

Please sign in to comment.