Skip to content

Commit

Permalink
fix building bun with new version of bun (#16328)
Browse files Browse the repository at this point in the history
  • Loading branch information
paperclover authored Jan 11, 2025
1 parent b04ce67 commit 487da0a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/codegen/bindgen-lib-internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,9 @@ function snapshotCallerLocation(): string {
}

function stackTraceFileName(line: string): string {
return / \(((?:[A-Za-z]:)?.*?)[:)]/.exec(line)![1].replaceAll("\\", "/");
const match = /(?:at\s+|\()(.:?[^:\n(\)]*)[^(\n]*$/i.exec(line);
assert(match, `Couldn't extract filename from stack trace line: ${line}`);
return match[1].replaceAll("\\", "/");
}

export type CAbiType =
Expand Down

0 comments on commit 487da0a

Please sign in to comment.