From: Thanh Ha Date: Wed, 15 Jan 2020 23:44:15 +0000 (-0500) Subject: Resolve shellcheck SC2116 useless echo X-Git-Tag: v0.50.0~17 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=5a5c4fa4ea569077d96c9a7b4f5fa1026ca0c39c;p=releng%2Fglobal-jjb.git 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 --- 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')