MacOS Command line developer tool popup
Describe the solution you'd like?
Warp should not cause Mac OS to show the popup if `git` is not installed. This isn't an ideal experience for new folks learning to program.
Is your feature request related to a problem? Please describe.
No response
Additional context
Someone who wants to learn programming that I shared an invitation code and proceeded to download and install Warp was confused about it.
I just started having this happen with git installed, and working normally. How do we stop this, it's really annoying. Every time I open a new window I get that popup.
I am experiencing this issue too! Any workarounds for the moment? I currently Installed Xcode CLI to run Warp without the constant Notifications. This takes up space. Can I do anything for now?
I am also experiencing this issue, I do not have xcode installed (nor do I want to) want to keep my Mac environment clean and isolate development on remote servers or vm's.
*Edit, It seems I did install git at some point as I see a directory for it on /usr/bin/git. If the window keeps re-appearing I will try removing it and seeing if it comes up again or not.
also experiencing this but from a 7700hq hackintosh emulating a 2017mbp (unsupported I expect). on ventura.
ill download Xcode 15.2 and check up on this later.
Just like iriscortex, I also have usr/bin/git in my files.
This should NOT be a requirement to use Warp. In my case I have homebrew-installed git, but I can't get Warp to use that git instead of /usr/bin/git for the Git-related chips in Warp prompt.
FWIW the Cursor.app (and I think VSCode too) has heavy Git integration but doesn't need this at all. Why does Warp?
You can fix this easily to use provided Git (where git) and not hardcode to /usr/bin/git for features like Warp prompt chips (these are the most likely cause for the XCode CLI installation prompt).
And you can gracefully fallback to not showing any Git-dependent features if it's not installed.
Workaround in macOS zsh
Run these commands:
mkdir -p "$HOME/.no-xcode"
printf '\n# Do not offer Xcode Command Line Tools; use non-Apple tools instead.\nexport DEVELOPER_DIR="$HOME/.no-xcode"\n' >> ~/.zshenv
launchctl setenv DEVELOPER_DIR "$HOME/.no-xcode"
Quit Warp, cancel the install prompt and relaunch Warp.
Explanation of the commands above:
- Make a directory called
.no-xcodein your home directory.- Append to (or create)
~/.zshenvin whichDEVELOPER_DIRis set to the new directory. (This only applies to shells, but doesn't affect Warp and other apps.)- Also set the same env var using
launchctl. (This should stop Warp and other apps from invoking the install prompt).
Unfortunately launchctl only lasts for current login session, and persisting it requires a Launch Agent:
mkdir -p "$HOME/.no-xcode" "$HOME/Library/LaunchAgents"
touch "$HOME/Library/LaunchAgents/local.no-xcode-tools.plist"
open -e "$HOME/Library/LaunchAgents/local.no-xcode-tools.plist"
Save this XML in the file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>local.no-xcode-tools</string>
<key>ProgramArguments</key>
<array>
<string>/bin/sh</string>
<string>-c</string>
<string>exec /bin/launchctl setenv DEVELOPER_DIR "$HOME/.no-xcode"</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
Then run to check:
plutil -lint "$HOME/Library/LaunchAgents/local.no-xcode-tools.plist"
launchctl bootstrap gui/$(id -u) "$HOME/Library/LaunchAgents/local.no-xcode-tools.plist"
launchctl getenv DEVELOPER_DIR
It should show OK and /Users/<your username>/.no-xcode. Quit and relaunch Warp. (Note: Keep the .zshenv file created earlier.)
At your earliest convenience, restart your Mac completely, because the prompt could still come up from time to time, but less frequently, because apps other than Warp might still be invoking it. A full restart helps kill it off completely. (So far I have not seen this prompt even after running the same usual apps I run.)
⚠️ Important note: Do not choose "Reopen windows when logged back in" or allow Warp, Cursor or other git-using apps to launch automatically on login. If they open before the launch agent sets the env var, they will invoke the install prompt. You must only open the apps after the launch agent has run.
Caveat: Most of the Git chips like branch status and index status will not function and will be hidden in the Warp prompt, but you can still see the chip with plain branch name.
10 days later: This workaround has helped! I haven't seen this annoying popup even once in the last week.
A month later: Still works great, but note a small quirk: In the System Settings > General > Login Items > "Allow in the Background" list there is an item named sh. I'm not sure, but disabling this seemed to stop the launch agent from setting the env var at startup.