Skip to content

Commit 55de875

Browse files
committed
fix: ensure consistent path formatting in buildPath function
1 parent c51ecf6 commit 55de875

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/engine/src/job/job.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ function buildPath() {
4848
const stackLines = err.stack?.split("\n");
4949
stackLines?.shift();
5050
const callerLine = stackLines?.find((line) => {
51-
const exclude = import.meta.filename.replaceAll("\\\\", "/");
51+
line = line.replaceAll("\\", "/");
52+
const exclude = import.meta.filename.replaceAll("\\", "/");
5253
return !line.includes(exclude);
5354
});
55+
5456
const match = callerLine?.match(/(file:\/\/)?((\w:)?[/\\].+):\d+:\d+/);
5557

5658
if (match) {

0 commit comments

Comments
 (0)