From e712f134b9eeeae0164ceca0ca930420cbcc14cd Mon Sep 17 00:00:00 2001 From: Davlet Panech Date: Tue, 7 Jun 2022 15:21:16 -0400 Subject: [PATCH] build-stx-images.sh: proper shell quoting The "--only" parameter doesn't work properly in some circumstances and builds more images than requested. Solution: add shell quotes. TESTS =================================== Run build-stx-images.sh --only stx-audit,stx-audit [...] and make sure it builds only the requested image. Closes-Bug: 1977879 Signed-off-by: Davlet Panech Change-Id: I4c9ddb16dd5e447c38d29e442f4e6790e5d146bb --- build-tools/build-docker-images/build-stx-images.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-tools/build-docker-images/build-stx-images.sh b/build-tools/build-docker-images/build-stx-images.sh index 0d912750..ca14b170 100755 --- a/build-tools/build-docker-images/build-stx-images.sh +++ b/build-tools/build-docker-images/build-stx-images.sh @@ -995,10 +995,10 @@ function find_image_build_files { all_labels["$LABEL"]="$image_build_file" # skip images we don't want to build - if is_in ${PROJECT} ${SKIP[@]} || is_in ${LABEL} ${SKIP[@]}; then + if is_in "${PROJECT}" ${SKIP[@]} || is_in "${LABEL}" ${SKIP[@]}; then continue fi - if ! is_empty ${ONLY[@]} && ! is_in ${PROJECT} ${ONLY[@]} && ! is_in ${LABEL} ${ONLY[@]}; then + if ! is_empty ${ONLY[@]} && ! is_in "${PROJECT}" ${ONLY[@]} && ! is_in "${LABEL}" ${ONLY[@]}; then continue fi