Trim worktree prefixes from tool paths regardless of case

This commit is contained in:
Ian Gulliver
2026-10-19 13:59:01 -07:00
parent 43d68d1d71
commit aab15c7d79
+4 -1
View File
@@ -878,7 +878,10 @@ private func toolTarget(_ input: (any Sendable)?, _ root: String) -> String {
} }
private func relative(_ path: String, _ 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 { private func resultText(_ content: (any Sendable)?) -> String {