I need to use sudo to run svn commands on my project. I have the SVN_EDITOR set to be vi in my own .bash_profile as well as in the root user’s .bash_profile, but when I try to do an svn propedit, I get
svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR is set, and no 'editor-cmd' run-time configuration option was found
Each time I start a new session, I have to set the SVN_EDITOR. This is a pain. Any suggestions on how/where I can set SVN_EDITOR permanently? This is on CentOS 5.4.
Running commands through sudo doesn’t start a login or “interactive” shell so adding it to various bashrc or profile resource files won’t help.
As DES said, the quick and dirty way is:
But as derobert commented, the better more permanent solution is to run
sudo visudoto edit /etc/sudoers , and addSVN_EDITORto the env_keep option.