From aab15c7d7929394ea2598249c6f2bf5e0734f96e Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Mon, 19 Oct 2026 13:59:01 -0700 Subject: [PATCH] Trim worktree prefixes from tool paths regardless of case --- mac/Sources/Byre/TranscriptBuilder.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mac/Sources/Byre/TranscriptBuilder.swift b/mac/Sources/Byre/TranscriptBuilder.swift index f5e178c..4006b7c 100644 --- a/mac/Sources/Byre/TranscriptBuilder.swift +++ b/mac/Sources/Byre/TranscriptBuilder.swift @@ -878,7 +878,10 @@ private func toolTarget(_ input: (any Sendable)?, _ root: String) -> String { } private func relative(_ path: String, _ root: String) -> String { - !root.isEmpty && path.hasPrefix("\(root)/") ? String(path.dropFirst(root.count + 1)) : path + guard !root.isEmpty, let r = path.range(of: "\(root)/", options: [.anchored, .caseInsensitive]) else { + return path + } + return String(path[r.upperBound...]) } private func resultText(_ content: (any Sendable)?) -> String {