fix(install): detect un-accepted Xcode license before build

Add an xcrun check after verifying Xcode CLT is installed. When the
Xcode/CLT license has not been accepted, cc exits with code 69 and
the build fails with a cryptic linker error. This surfaces a clear
message telling the user to run `sudo xcodebuild -license accept`.
This commit is contained in:
argenis de la rosa 2026-03-21 07:15:45 -04:00
parent ee870028ff
commit 53b82ea3cc

View File

@ -568,6 +568,13 @@ then re-run bootstrap.
MSG
exit 0
fi
# Detect un-accepted Xcode/CLT license (causes `cc` to exit 69).
if ! /usr/bin/xcrun --show-sdk-path >/dev/null 2>&1; then
warn "Xcode license has not been accepted. Run:"
warn " sudo xcodebuild -license accept"
warn "then re-run this installer."
exit 1
fi
if ! have_cmd git; then
warn "git is not available. Install git (e.g., Homebrew) and re-run bootstrap."
fi