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

On macOS check if git is a stub or not before importing gitpython. #58581

merged 9 commits into from Sep 30, 2020


Copy link

@sheagcraig sheagcraig commented Sep 29, 2020

What does this PR do?

On a freshly installed macOS, accessing git triggers a GUI dialog prompting users to install the Developer Command Line Tools. This is a nuisance for users, and since Salt really only cares about whether git is present, if we can find another way... Well we did!

On macOS, first we do a which git. If the git we get back is the "standard" location, we then use the stock xcode-select -p command, to determine whether the Developer tools are installed. If they aren't, this git is actually a stub and will trigger the dialog.

What issues does this PR fix or reference?

Fixes: #58575

Previous Behavior

See issue; every Salt run, the gitfs module triggers the GUI dialog.

New Behavior

On macOS without the Developer Command Line Tools, no dialogs are shown.

Merge requirements satisfied?

Commits signed with GPG?


@sheagcraig sheagcraig requested a review from a team as a code owner September 29, 2020 20:28
@sheagcraig sheagcraig requested review from waynew and removed request for a team September 29, 2020 20:28
@ghost ghost requested a review from garethgreenaway September 29, 2020 20:28
Copy link

weswhet commented Sep 29, 2020

actually I think we'll need to do a which git here and then only do a stub check if the git to be used is /usr/bin/git

@sagetherage sagetherage added the Magnesium Mg release after Na prior to Al label Sep 30, 2020
@dwoz dwoz merged commit b8d4363 into saltstack:master Sep 30, 2020
26 checks passed
Copy link

weswhet commented Sep 30, 2020

wow, thanks so much all! Thought for sure we weren't gonna get this in, in time. 💯 🥳 🎊 🍾

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Magnesium Mg release after Na prior to Al
None yet

Successfully merging this pull request may close these issues.

[BUG] Salt on stock macOS triggers Command Line Developer Tools GUI dialog
5 participants