Yes, I have found other questions asking the same:
- TERM environment variable not set on mac
- TERM environment variable not set
- how to remove "TERM environment variable not set"
...
However, my environment variable is set:
$ echo $TERM
xterm-256color
But LLDB does not recognize so:
$ lldb myexecutable
(lldb) target create "myexecutable"
Current executable set to 'myexecutable' (x86_64).
(lldb) platform shell clear
TERM environment variable not set.
error: command returned with status 1
I have my environment variables set up for GUI programs too:
envars.app (applescript application run on logon.)
...
set ENV_TERM to "/bin/launchctl setenv TERM xterm-256color;"
...
do shell script ... & ENV_TERM & ...
or
...
set ENV_TERM to "/bin/launchctl setenv TERM xterm-256color:-dumb;"
...
do shell script ... & ENV_TERM & ...