From 2ca2f1fcffa5d99a177b002c9ef6c76d8b174650 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Fri, 13 Dec 2013 10:57:42 +0100 Subject: [PATCH] gsu_gui: Add check for dialog executable. Currently, programs which use gsu_gui exit silently with no indication about what went wrong if dialog is not installed. This patch makes it print an error message in this case. --- misc/gsu/gui | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/misc/gsu/gui b/misc/gsu/gui index 30c95a4..5b108e1 100644 --- a/misc/gsu/gui +++ b/misc/gsu/gui @@ -201,6 +201,11 @@ gsu_gui() local tree="$1" subtree _gsu_setup + type -t dialog &> /dev/null + if (($? != 0)); then + gsu_msg "dialog executable not found" + exit 1 + fi _get_root_nodes "$tree" subtree="$result" _browse "$gsu_name main menu" "$tree" "$subtree" -- 2.39.5