views:

50

answers:

1

I keep on getting the "TERM environment variable not set." error when I work with svn commands on my Mac terminal.

I thought I had set up my profile by doing:

export SVN_EDITOR=/usr/bin/nano
export EDITOR=/usr/bin/nano

in .profile and .bash_profile, reset the terminal and it still gives me that error.

Any help?

+2  A: 

Add this to your profile:

export TERM=xterm-color
Jonathan Leffler
Hi mate, I did put that in both profile items (already was present in one of them) and it still gives me that error.
Doron Katz
i also did echo $TERM and it shows the result i added (you mentioned above)
Doron Katz
@Doron: By the time the SVN commands are run, your TERM value has been unset. Time to review all the commands (with grep, probably) that you use and see if any of them do `unset TERM` or any equivalent. Because the SVN commands would not say "TERM not set" if it was set. You might need to scan 'dot files' in your home directory too. Or any cover scripts you have. You might need to look for 'env -i' as another possibility. But something is killing your env var.
Jonathan Leffler
Thanks that might be it mate. Ill have to scan and see how i go. Thanks
Doron Katz
@Doron: one thing to check - when you get the error, sometime, `echo $TERM`. That will tell you whether your environment got clobbered before you tried running SVN (because the echo didn't show a value for $TERM) or that something you invoke while running the SVN command clobbers it because TERM is set immediately before, and after, you get the failure message from SVN.
Jonathan Leffler