I use Arch Linux with VsCode to write Java and Python programs and have no issues. When I installed some Bash extensions and started writing bash scripts, it outputs "TERM environment variable not set." It will not let me read user input or finish running the script if it needs that to continue. This just seems to be an issue with bash because everything works fine with Java and Python. The extensions I installed are Bash Debug, Bash Beautify, Bash IDE, BASH extension pack, Bats, Bash-snippets, and a few others. I can run the scripts fine in my system shell, but not in VsCode. Any suggestions would be appreciated.
I have tried adding my $PATH to the settings.json folder but it didn’t fix it. I also tried adding "export TERM=xterm-256color" to ~/.bashrc, but this didn’t fix it either.
2
Answers
I had to set "code-runner.runInTerminal": true. Apparently,VsCode does not allow input in the "Output". Problem fixed.
Try setting "inheritEnv" in VsCode if it isn’t already.