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:
parent
ee870028ff
commit
53b82ea3cc
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user