Browse Source

base-files: ensure VERBOSE is set

If not set, it shows the following error
sh: out of range

Signed-off-by: Alexander Couzens <[email protected]>
Alexander Couzens 6 years ago
parent
commit
b77fd0d30b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      package/base-files/files/lib/upgrade/common.sh

+ 1 - 1
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() {