ssh kitten: Better error message when tar is missing

This commit is contained in:
Kovid Goyal
2022-09-21 07:34:15 +05:30
parent 2a2dca8a58
commit e2a251224d

View File

@@ -92,6 +92,7 @@ read_base64_from_tty() {
untar_and_read_env() {
# extract the tar file atomically, in the sense that any file from the
# tarfile is only put into place after it has been fully written to disk
command -v tar > /dev/null 2> /dev/null || die "tar is not availiable on this server. The ssh kitten requires tar."
tdir=$(command mktemp -d "$HOME/.kitty-ssh-kitten-untar-XXXXXXXXXXXX")
[ $? = 0 ] || die "Creating temp directory failed"
# suppress STDERR for tar as tar prints various warnings if for instance, timestamps are in the future