I have run into an ERROR with SBT today. It can best be shown with the sbt sbt-version
command:
Run on 5/29/17:
eric@linux-x2vq:~$ sbt s
I had the same issue, especially when the TERM
environment variable is set to xterm-256color
. Setting it to a different value fixed the issue for me, e.g.
export TERM=xterm-color
I found the package which causes this issue: ncurses
. I downgraded ncurses
to version ncurses-6.0+20170429-1
(I am using Arch Linux) and SBT starts just fine.
Steps for Arch Linux:
cd /var/cache/pacman/pkg
sudo pacman -U ncurses-6.0+20170429-1-x86_64.pkg.tar.xz # or some other older version
Steps for Mac: see https://github.com/jline/jline2/issues/281
I think this issue was introduced with ncurses version 20170506, see: http://invisible-island.net/ncurses/NEWS.html#index-t20170506
+ modify tic/infocmp display of numeric values to use hexadecimal when
they are "close" to a power of two, making the result more readable.
I filed an issue on the SBT issue tracker: https://github.com/sbt/sbt/issues/3240
Edit: SBT version 0.13.16 includes the fix for this problem.
One year passed... now it happened to me.
So, ncurses did change, and the corresponding sbt part was ...I guess... probably only implemented based on random guessed tests and observations/bugs and not any spec nor RFC. (So far, sbt is the only program with this ncurses issue that I know of.)
In case you can't simply upgrade sbt nor downgrade ncurses, you could change the TERM environment variable as mentioned in the other answers.
If your sbt script is some bash script (most likely, unless you run DOS' .bat files)
$ file /usr/bin/sbt
/usr/bin/sbt: Bourne-Again shell script, ASCII text executable
, then it might suffice to add this workaround:
TERM="${TERM/xterm-256color/xterm-color}"
I can't write a comment as my score is too low, but user3113045's answer worked when I added export TERM=xterm-color
to my .zshrc
file
For Ubuntu 20.04 Users, Open your terminal and run the bellow CMDs
Ex:-
#!/usr/bin/env bash
export TERM=xterm-color
set +e
sbt
command is just a script. It load $HOME/.sbtconfig
at the very beginning, so just put
export TERM=xterm-color
as @user3113045 said in the conf file, sbt will work. In that case your other term commands will still use xterm-256color
.