Skip to content

Commit db30f0f

Browse files
committed
Fix up variable substitution
This seems to work undefined varibles and null strings
1 parent 406094f commit db30f0f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bin/rally-verify-wrapper.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ artifacts_dir=/home/rally/artifacts
1313
tempest_source_default="--source /opt/tempest"
1414

1515
tempest_source="$tempest_source_default"
16-
if [ ! -z ${TEMPEST_SOURCE-x} ]; then
16+
if [ ! -z ${TEMPEST_SOURCE:+x} ]; then
1717
tempest_source="--source $TEMPEST_SOURCE"
1818
fi
1919

2020
tempest_version=""
21-
if [ ! -z ${TEMPEST_VERSION-x} ]; then
21+
if [ ! -z ${TEMPEST_VERSION:+x} ]; then
2222
tempest_version="--version $TEMPEST_VERSION"
2323
fi
2424

@@ -34,12 +34,12 @@ if [ -f ~/tempest-skip-list ]; then
3434
fi
3535

3636
pattern=""
37-
if [ ! -z ${TEMPEST_PATTERN-x} ]; then
37+
if [ ! -z ${TEMPEST_PATTERN:+x} ]; then
3838
pattern="--pattern $TEMPEST_PATTERN"
3939
fi
4040

4141
concurrency=""
42-
if [ ! -z ${$TEMPEST_CONCURRENCY-x} ]; then
42+
if [ ! -z ${$TEMPEST_CONCURRENCY:+x} ]; then
4343
concurrency="--concurrency $TEMPEST_CONCURRENCY"
4444
fi
4545

0 commit comments

Comments
 (0)