Skip to content

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

Merged
dwoz merged 9 commits into
saltstack:masterfrom
sheagcraig:fix_58575_macOS_CLT_Dialog
Sep 30, 2020
Merged

On macOS check if git is a stub or not before importing gitpython.#58581
dwoz merged 9 commits into
saltstack:masterfrom
sheagcraig:fix_58575_macOS_CLT_Dialog

Conversation

@sheagcraig

@sheagcraig sheagcraig commented Sep 29, 2020

Copy link
Copy Markdown
Contributor

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?

Yes

@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
@weswhet

weswhet commented Sep 29, 2020

Copy link
Copy Markdown
Contributor

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
@weswhet

weswhet commented Sep 30, 2020

Copy link
Copy Markdown
Contributor

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

Labels

Magnesium Mg release after Na prior to Al

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

5 participants