Better error messages

This commit is contained in:
Kovid Goyal 2022-02-23 23:39:52 +05:30
parent 2dfea0f213
commit 198dd52700
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -65,6 +65,7 @@ rc=$?
command rm -f "$encoded_data_file"
encoded_data_file=""
if [ "$rc" != "0" ]; then die "Failed to extract data transmitted by ssh kitten over the TTY device"; fi
if [ ! -f "$HOME/.terminfo/kitty.terminfo" ]; then die "Extracted data transmitted by ssh kitten is incomplete"; fi
# export TERMINFO
tname=".terminfo"
@ -76,7 +77,7 @@ export TERMINFO="$HOME/$tname"
# compile terminfo for this system
if [ -x "$(command -v tic)" ]; then
tic_out=$(command tic -x -o "$HOME/$tname" ".terminfo/kitty.terminfo" 2>&1)
tic_out=$(command tic -x -o "$HOME/$tname" "$HOME/.terminfo/kitty.terminfo" 2>&1)
rc=$?
if [ "$rc" != "0" ]; then die "$tic_out"; fi
fi