Skip to content

Commit fb7ed54

Browse files
committed
[FAB-13292] fix version check in bootstrap.sh
The check for the specified version string should be augmented by wrapping the command line argument in quotation marks: if no version is provided (which is allowed), the test fails because the non-quoted variable disappears and the test bash built-in has two illegal switches next to one another, leading to bash: line 181: [: too many arguments Change-Id: I6ca1d654ef38d6ea0fabcd3ca24c0d861321d489 Signed-off-by: Alessandro Sorniotti <ale.linux@sopit.net> (cherry picked from commit 56c855d)
1 parent 158392d commit fb7ed54

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/bootstrap.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,11 @@ BINARIES=true
176176

177177
# Parse commandline args pull out
178178
# version and/or ca-version strings first
179-
if [ ! -z $1 -a ${1:0:1} != "-" ]; then
179+
if [ ! -z "$1" -a ${1:0:1} != "-" ]; then
180180
VERSION=$1;shift
181-
if [ ! -z $1 -a ${1:0:1} != "-" ]; then
181+
if [ ! -z "$1" -a ${1:0:1} != "-" ]; then
182182
CA_VERSION=$1;shift
183-
if [ ! -z $1 -a ${1:0:1} != "-" ]; then
183+
if [ ! -z "$1" -a ${1:0:1} != "-" ]; then
184184
THIRDPARTY_IMAGE_VERSION=$1;shift
185185
fi
186186
fi

0 commit comments

Comments
 (0)