From 5a5c4fa4ea569077d96c9a7b4f5fa1026ca0c39c Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Wed, 15 Jan 2020 18:44:15 -0500 Subject: [PATCH] Resolve shellcheck SC2116 useless echo SC2116: Useless echo? Instead of 'cmd $(echo foo)', just use 'cmd foo' Signed-off-by: Thanh Ha Change-Id: If656687c1968b901255bf4d4108f193bffc69cce --- shell/gerrit-fetch-dependencies.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/gerrit-fetch-dependencies.sh b/shell/gerrit-fetch-dependencies.sh index 24542e90..ed42596f 100644 --- a/shell/gerrit-fetch-dependencies.sh +++ b/shell/gerrit-fetch-dependencies.sh @@ -39,7 +39,7 @@ set -u # End git-review workaround projects=() -for patch in $(echo "${PATCHES[@]}"); do +for patch in "${PATCHES[@]}"; do json=$(curl -s "$GERRIT_URL/changes/$patch" | sed -e "s/)]}'//") project=$(echo "$json" | jq -r '.project') branch=$(echo "$json" | jq -r '.branch') -- 2.16.6