3

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?

Ether
  • 53,118
  • 13
  • 86
  • 159
Doz
  • 7,009
  • 12
  • 61
  • 69

1 Answers1

9

Add this to your profile:

export TERM=xterm-color
Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
  • Hi mate, I did put that in both profile items (already was present in one of them) and it still gives me that error. – Doz Oct 12 '10 at 20:35
  • i also did echo $TERM and it shows the result i added (you mentioned above) – Doz Oct 12 '10 at 20:36
  • @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 Oct 12 '10 at 20:54
  • Thanks that might be it mate. Ill have to scan and see how i go. Thanks – Doz Oct 12 '10 at 21:24
  • 1
    @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 Oct 12 '10 at 21:28