Skip to content

Commit

Permalink
fix: 修复 linux 下绝对路径匹配的问题
Browse files Browse the repository at this point in the history
fix #18
  • Loading branch information
LinLin00000000 committed Mar 4, 2024
1 parent 3a0e7aa commit ed7a344
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ function getCallerFilePath() {
let result
for (let i = 2; i < stackLines.length; i++) {
const match = stackLines[i].match(
/(?:at file:\/\/\/)([^]+?):\d+:\d+/
/(?:at file:\/+)((?:[a-zA-Z]:|\/)[^]+?):\d+:\d+/
)
if (match && match[1]) {
result = match[1]
Expand Down

0 comments on commit ed7a344

Please sign in to comment.