Win Unix Mac

Articles,How Tos,Tips n more

  • Increase font size
  • Default font size
  • Decrease font size

svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR are set

E-mail Print PDF

If you get the error message "svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR are set, and no 'editor-cmd' run-time configuration option was found" and want to know how to fix it, both temporarily and permanently, read on.

The problem here is a missing environmental variable missing, dont get too scared about that, its not at all complex.

In the short term,  you can type the following in the shell, to correct this temporarily and get your commit done use the export VARIABLE method, example shown belown

bigmac:~ neil$ export SVN_EDITOR=vi


To test it has worked you can use the echo command, example below

bigmac:~ neil$ echo $SVN_EDITOR

vi


The permanent fix it to set up your shell properly, my examples use the bash shell, hopefully your system does too

Step 1)

If you want to set the variable system wide you will be working with the file /etc/profile
If you want to set the variable for your personal shell, edit .bash_profile in your home directory or ~/.bash_profile

Step 2)

Edit the file chose in step one and add the next line, try to find similar export or path statements to place them into:


export SVN_EDITOR=vi


That's it, your done and it should be fixed permanently now in your system wide settings if you chose /etc/profile or your own personal profile in .bash_profile

Here is my .bash_profile

export EDITOR=vi

export SVN_EDITOR=vi

export PATH=/opt/local/bin:/opt/local/sbin:/Users/neil/bin:~/bin:/opt/local/bin/:$PATH

export MANPATH=/opt/local/share/man:$MANPATH


Assuming that vi is your editor, it could be pico, nano, emacs or your favourite edit there

In order for the changes to get noticed you need to source your profile, by issues a "." (dot)  .yourprofile ( should be .bash_profile )

bigmac:~ neil$ . .bash_profile

Environmental variables are a feature of the shell, the env command display all the variables, see the example below where the output is processed with egrep to show either EDITOR or VISUAL

bigmac:~ neil$ env | egrep "EDITOR|VISUAL"

SVN_EDITOR=vi

EDITOR=vi

 

Last Updated on Wednesday, 02 September 2009 17:37  
Comments (1)
Thanks
1 Tuesday, 22 September 2009 12:54
Ralph Baker
Thanks, I needed to fix this permanently but I am not a Unix expert, your guide was simple and its done now !

Add your comment

Your name:
Subject:
Comment:

yvcomment, category: "Unix Error Messages"