Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect xcode git shim and handle appropriately #57

Merged
merged 5 commits into from
May 9, 2024

Conversation

maxfierke
Copy link
Owner

@maxfierke maxfierke commented Apr 28, 2024

We need to ignore the default CLT shim for git and find the real path ourselves to properly skip git fetches before git is available. Otherwise, it seems present, but is actually missing and will pop up the Xcode CLT installer dialog and fail to fetch git resources.

This is based broadly on what is being done by Homebrew here: https://github.com/Homebrew/install/blob/52237ea74f41d2456a5b1bd3e4c2b0cb94485c3c/install#L118-L151

@maxfierke maxfierke force-pushed the mf-detect_xcode_git_shim branch 2 times, most recently from 2ea8cff to d647a60 Compare April 28, 2024 22:50
We need to ignore the default CLT shim for git and find the _real_ path ourselves to properly skip git fetches before git is available. Otherwise, it _seems_ present, but is actually missing and will pop up the Xcode CLT installer dialog and fail to fetch git resources
Static libs are missing for OpenSSL@3 in current GitHub Actions macOS-14 runner
image is broken until it pulls in Homebrew/homebrew-core#169721

Removed "install from API" config too, since auto upgrades are disabled anyway.
@maxfierke maxfierke marked this pull request as ready for review April 28, 2024 23:08
Git lookup occurs before lsb_release might be available for distro
determination, leading to a quick crash from an UnsupportedDistroError.

Until we have a better way of doing distro detection, we'll need to avoid
doing anything distro-specific until we know lsb_release is available
xcrun is also a shim, and because we're optimizing for strap.sh & Homebrew, they'll install Xcode CLT anyway. Therefore, there's little value here in trying to be extra robust by using xcrun
@maxfierke maxfierke merged commit 91dc74b into main May 9, 2024
7 checks passed
@maxfierke maxfierke deleted the mf-detect_xcode_git_shim branch May 9, 2024 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant