From: Alexander Couzens Date: Wed, 13 Nov 2019 17:13:13 +0000 (+0100) Subject: base-files: ensure VERBOSE is set X-Git-Tag: v21.02.0-rc1~3006 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b77fd0d30bfa93def97fc1633d389b994600fea3;p=openwrt%2Fstaging%2Fchunkeey.git base-files: ensure VERBOSE is set If not set, it shows the following error sh: out of range Signed-off-by: Alexander Couzens --- diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh index 49c2fa0e7b..a4de7e1666 100644 --- a/package/base-files/files/lib/upgrade/common.sh +++ b/package/base-files/files/lib/upgrade/common.sh @@ -64,7 +64,7 @@ ask_bool() { } v() { - [ "$VERBOSE" -ge 1 ] && echo "$@" + [ -n "$VERBOSE" ] && [ "$VERBOSE" -ge 1 ] && echo "$@" } json_string() {