(cause: unknown)
| 179 | } |
| 180 | |
| 181 | function looksLikePathspecMiss(cause: unknown): boolean { |
| 182 | if (!(cause instanceof Error)) return false; |
| 183 | const m = cause.message.toLowerCase(); |
| 184 | return m.includes("could not find") || m.includes("not in the index") || m.includes("enoent"); |
| 185 | } |
| 186 | |
| 187 | function firstPathspec(paths: string[]): string { |
| 188 | return paths[0] ?? ""; |