diff --git a/src/bun.js/bindings/ZigStackFrame.zig b/src/bun.js/bindings/ZigStackFrame.zig index e9a950033d..3d9bc442ae 100644 --- a/src/bun.js/bindings/ZigStackFrame.zig +++ b/src/bun.js/bindings/ZigStackFrame.zig @@ -69,9 +69,10 @@ pub const ZigStackFrame = extern struct { if (this.enable_color) { const not_root = if (comptime bun.Environment.isWindows) this.root_path.len > "C:\\".len else this.root_path.len > "/".len; if (not_root and strings.startsWith(source_slice, this.root_path)) { + const root_path = strings.withoutTrailingSlash(this.root_path); const relative_path = strings.withoutLeadingPathSeparator(source_slice[this.root_path.len..]); try writer.writeAll(comptime Output.prettyFmt("", true)); - try writer.writeAll(this.root_path); + try writer.writeAll(root_path); try writer.writeByte(std.fs.path.sep); try writer.writeAll(comptime Output.prettyFmt("", true)); try writer.writeAll(relative_path);