How do I resolve svn: The subversion command line tools are no longer provided by Xcode
I have subversion and Unity installed via brew.
I have code in Unity to run svn
and it returns the error:
svn: The subversion command line tools are no longer provided by Xcode.
But if I run svn
in Terminal, it works correctly.
How do I resolve this issue?
Solution 1:
Turns out that Unity wasn't receiving the correct path. I think this would be true for most applications launched from the Dock, Finder, or Spotlight (but not from the Terminal). (It's not the case for MacVim, but that's unsurprising so I didn't dig into why.)
It had this set for PATH:
PATH=/usr/bin:/bin:/usr/sbin:/sbin
My .bashrc, .zsh_profile, etc didn't effect the PATH.
This post explains that on macOS you need to use launchctl to set your PATH for it to be respected by apps launched outside of a shell. Since I have svn from brew, it's in /usr/local/bin
:
sudo launchctl config user path /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
Once I'd done that, rebooted, closed, and re-opened Unity, then it found my brew-installed svn.