You are not logged in.
I have a problem where SVN and Git cant see that the EDITOR variable is set on my system when I go to make a commit, they both error out because the EDITOR variable (as well as other variables are blank). This is the error that I get from SVN:
┌─(vendion@Tyre Fri, 02 Sep 11)───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────(08:48)──┘
└─(/srv/http/juice38)─> sudo svn ci
svn: Commit failed (details follow):
svn: Could not use external editor to fetch log message; consider setting the $SVN_EDITOR environment variable or using the --message (-m) or --file (-F) options
svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR are set, and no 'editor-cmd' run-time configuration option was found
┌─(vendion@Tyre Fri, 02 Sep 11)───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────(08:48)──┘
└─(/srv/http/juice38)─> echo $EDITOR
vim
Git acts the same way but with its own error message (sorry don't have an example of this currently), is there a way to fix this so that Git and SVN will see that I do have an EDITOR set and use it with out having to change terminals (works fine in xterm...)
Last edited by vendion (2011-09-02 16:08:48)
Offline
This is due to sudo working with a new environment: see your sudoers file for the "env_keep" option.
Offline
Sorry over looked that, when I run sudo to check the EDITOR variable it also has vim set
┌─(vendion@Tyre Fri, 02 Sep 11)───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────(09:42)──┘
└─(/home/vendion/Projects/TickIt)─> sudo echo $EDITOR
Password:
vim
Offline
The variable EDITOR is substituted before invoking sudo. Try something like the following:
sudo bash -c 'echo $EDITOR'
(Note the single quotes.)
Offline
Ah yea calling it that way shows EDITOR as being empty...
Offline
Ok so I added
Defaults env_keep += "EDITOR"
to my sudoers file and now EDITOR shows vim when ran via sudo
Offline
Do you still experience the problems as described in your first post? Why do you even run git/svn via sudo, is that a sane setup?
Offline