base-files: ensure VERBOSE is set
authorAlexander Couzens <lynxis@fe80.eu>
Wed, 13 Nov 2019 17:13:13 +0000 (18:13 +0100)
committerAlexander Couzens <lynxis@fe80.eu>
Mon, 20 Apr 2020 22:01:49 +0000 (00:01 +0200)
If not set, it shows the following error
sh: out of range

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
package/base-files/files/lib/upgrade/common.sh

index 49c2fa0e7b1ce628c68d6070513f4e835ffed6b7..a4de7e166624de20f1951a59c18b96cd7e19cdd2 100644 (file)
@@ -64,7 +64,7 @@ ask_bool() {
 }
 
 v() {
-       [ "$VERBOSE" -ge 1 ] && echo "$@"
+       [ -n "$VERBOSE" ] && [ "$VERBOSE" -ge 1 ] && echo "$@"
 }
 
 json_string() {