Trim worktree prefixes from tool paths regardless of case
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user