Fix warning for Ubuntu containers: "Error: terminfo entry not found for xterm-256color"

On Ubuntu, both /usr/share/terminfo and /lib/terminfo can have contents, and xterm-256color is at /lib/terminfo (provided by ncurses-base package) while xterm+256color is at /usr/share/terminfo (provided by ncurses-term package). This PR checks both directory to suppress the warning.
This commit is contained in:
Kan Li 2020-10-01 12:29:14 -07:00 committed by Ondřej "Harry" Míchal
parent c3264abc96
commit 30ee7d9a38
1 changed files with 1 additions and 0 deletions

View File

@ -57,6 +57,7 @@ if [ -f /run/.containerenv ] \
if [ "$TERMINFO" = "" ]; then
! [ -e "/usr/share/terminfo/$terminfo_sub_directory" ] \
&& ! [ -e "/lib/terminfo/$terminfo_sub_directory" ] \
&& ! [ -e "$HOME/.terminfo/$terminfo_sub_directory" ] \
&& echo "$error_message" >&2
else