This question already has an answer here:

Please help me figure out how to set a system wide PATH.....

I have upgraded svn to version 1.8.10 on osx 10.9

One of the required steps was adding the address of the current svn to the PATH.

export PATH=/opt/subversion/bin:$PATH

Doing it in he current terminal, it allowed me to see the svn --version as 1.8.10, but upon closing the terminal, the version reverted to 1.7

I read that I can add this line to ~/.profile or ~/.bash_profile

These files do not exist on my mac

I created the .profile and added the line above. From terminal, now I can get the correct version. But I am required to read this version from a different program (my Qt project calls a command

system(svnversion -n)

Even though in terminal I can get the correct svn version, the command above still gives an error "This client is too old to work with the working copy..."

The directions i find online, like this, say I also have to modify the .bash_profile (which does not exist on my machine) or edit/add something inside the /etc/paths.d directory - mine is empty !

Please help - how do I add this path to the system PATH variable ? Considering that all the default places to add it are missing ? And make it work from other programs not just Terminal ?

marked as duplicate by bmike Dec 1 '14 at 23:42

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Feel free to edit this if you don't find an answer in the linked questions. Just make the question clearly different than the linked ones and we can reopen this. – bmike Dec 1 '14 at 23:41
  • 1
    For other apps like Finder - apple.stackexchange.com/questions/87282/… – bmike Dec 1 '14 at 23:41
  • 1
  • Or use homebrew or the file listed here... apple.stackexchange.com/questions/49389/… – bmike Dec 1 '14 at 23:43
  • After adding the desired path to the PATH through a couple of methods [run 'set' and the svn path is shown first in the PATH variable] - Qt Creator still uses the /usr/bin location. Found out that the svn path is written into Preferences... So while any of the above methods are great, it seems that I asked the wrong question... – Thalia Dec 12 '14 at 17:18

Browse other questions tagged .