jshn: in json_get_values(), handle json_select errors
authorFelix Fietkau <nbd@openwrt.org>
Mon, 2 Dec 2013 09:56:54 +0000 (10:56 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 2 Dec 2013 09:56:54 +0000 (10:56 +0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
sh/jshn.sh

index 176063f..70b7976 100644 (file)
@@ -209,7 +209,7 @@ json_get_values() {
 
        unset "$_v_dest"
        [ -n "$2" ] && {
-               json_select "$2"
+               json_select "$2" || return 1
                _select=1
        }