mirror of
https://github.com/unclebob/crapper.git
synced 2026-11-26 18:18:49 +00:00
On a Mac, swift is /usr/bin/swift and llvm-cov lives in the Xcode toolchain. llvm_cov_tool now falls back to `xcrun --find llvm-cov` after the PATH and sibling lookups. A missing xcrun, a non-zero exit, an empty or missing path, or a failure to start leaves the tool unset. Proved by test_xcrun_finds_llvm_cov_when_it_is_not_beside_swift and test_a_missing_or_failing_xcrun_leaves_llvm_cov_unset. The sibling still wins when both are present. Co-authored-by: Robert C. Martin <[email protected]>