fix(install): detect xcode-select git stub on fresh macOS

This commit is contained in:
Brooklyn Nicholson 2026-05-31 00:41:33 -05:00
parent 357db76b40
commit 69bea59556

View file

@ -757,7 +757,8 @@ attempt_install_git() {
check_git() {
log_info "Checking Git..."
if command -v git &> /dev/null; then
# On fresh macOS /usr/bin/git is a stub that exits non-zero until CLT is installed.
if command -v git &> /dev/null && git --version &> /dev/null; then
GIT_VERSION=$(git --version | awk '{print $3}')
log_success "Git $GIT_VERSION found"
return 0