mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-11-21 01:42:15 +00:00
1e1ed51601
list_xcat_packages reads the terminal width with tput cols. With an unknown or unset TERM, tput prints "unknown terminal" or "No value for $TERM" in the middle of the go-xcat output. Check the terminal type with tput longname, with its output discarded, before reading the width. tput cols keeps its stderr, because the tput of ncurses 5 (EL7) reads the width through stderr. With stderr discarded, it reports 80 columns on a wider terminal.