You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On macOS, /usr/bin/git exists even if git might not be installed - it is a tiny libxcselect.dylib wrapper that basically runs xcrun git which finds git in the installed Xcode or Command Line Tools (...Developer/) path. It prompts the user to install Xcode if they don't have it, which they very well might not if they installed fish via the .pkg installer or are trying the .app bundle. I am not sure what it does if the user isn't an administrator that can't install Xcode anyhow, like if someone tries fish in a computer lab or something.
So, git exists but running git prints an error in this situation:
> gitxcode-select: note: no developer tools were found at '/Applications/Xcode.app',requesting install. Choose an option in the dialog to download the command linedeveloper tools.
… and pops up a modal dialog:
Since we try git in fish_git_prompt which fish_prompt tries by default, as long as command -sq git works, this makes fish pretty unusable unless the person relents. The only positive thing I can say, is it is throttled to display no more than once per 10 seconds. It's not our fault, but it's annoying enough I'm calling it a bug.
xcrungit.mp4
The solution here is going to be gating git behind some check if the developer tools are installed if command git is /usr/bin/git on Darwin.
On macOS,
/usr/bin/gitexists even ifgitmight not be installed - it is a tiny libxcselect.dylib wrapper that basically runsxcrun gitwhich findsgitin the installed Xcode or Command Line Tools (...Developer/) path. It prompts the user to install Xcode if they don't have it, which they very well might not if they installed fish via the .pkg installer or are trying the .app bundle. I am not sure what it does if the user isn't an administrator that can't install Xcode anyhow, like if someone tries fish in a computer lab or something.So,
gitexists but runninggitprints an error in this situation:… and pops up a modal dialog:

Since we try
gitinfish_git_promptwhichfish_prompttries by default, as long ascommand -sq gitworks, this makes fish pretty unusable unless the person relents. The only positive thing I can say, is it is throttled to display no more than once per 10 seconds. It's not our fault, but it's annoying enough I'm calling it a bug.xcrungit.mp4
The solution here is going to be gating
gitbehind some check if the developer tools are installed ifcommand gitis /usr/bin/git on Darwin.edit: or find a trick to suppress the dialog.