Add error message if no suitable image viewer found

This commit is contained in:
Marty Oehme 2023-01-08 17:27:53 +01:00
parent 5a6c826ca5
commit 1ceacc5b22
Signed by: Marty
GPG key ID: 73BA40D5AFAF49C9

1
uoeia
View file

@ -93,6 +93,7 @@ get_imageviewer() {
} }
main() { main() {
[ -n "$imageviewer" ] || die "Error: Could not find a suitable image viewer, set one manually with the '-v' option."
command -v "${imageviewer}" 1>/dev/null 2>&1 || die "Error: Opening images in ${imageviewer} requires ${imageviewer} to be installed and and on the path." command -v "${imageviewer}" 1>/dev/null 2>&1 || die "Error: Opening images in ${imageviewer} requires ${imageviewer} to be installed and and on the path."
trap cleanup EXIT trap cleanup EXIT