From 0c3a3b051e08589189914bc543378e4dd2dcdeb8 Mon Sep 17 00:00:00 2001 From: Mikhail Feoktistov Date: Thu, 3 Sep 2015 18:15:28 +0300 Subject: [PATCH] Fix upload_image error in stackrc This commit fixes error caused by adding default image path to IMAGE_URLS without ',' If user sets IMAGE_URLS in localrc like IMAGE_URLS="path1, path2" (with a space after the comma) the we get an error "binary operator expected" in if [ -n $IMAGE_URLS ] condition and a comma will not be added to the end of IMAGE_URLS In the code below we add default image path(path3) to IMAGE_URLS and we get IMAGE_URLS="path1, path2path3" Change-Id: I6543f7178c49a42c71ad9df4cdb4c6e78cbf7758 --- stackrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stackrc b/stackrc index b838911d97..ca897a1c4d 100644 --- a/stackrc +++ b/stackrc @@ -565,7 +565,7 @@ CIRROS_ARCH=${CIRROS_ARCH:-"x86_64"} # ``IMAGE_URLS`` to be set in the `localrc` section of ``local.conf``. DOWNLOAD_DEFAULT_IMAGES=$(trueorfalse True DOWNLOAD_DEFAULT_IMAGES) if [[ "$DOWNLOAD_DEFAULT_IMAGES" == "True" ]]; then - if [ -n $IMAGE_URLS ]; then + if [[ -n "$IMAGE_URLS" ]]; then IMAGE_URLS+="," fi case "$VIRT_DRIVER" in