Skip to content

Commit c4898d6

Browse files
committed
fix shellcheck failures list-resources.sh
update pull request update pull request update pull request
1 parent 20b76a2 commit c4898d6

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

cluster/gce/list-resources.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,20 @@ function gcloud-list() {
4949
local attempt=1
5050
local result=""
5151
while true; do
52-
if result=$(gcloud ${group} ${resource} list --project=${PROJECT} ${filter:+--filter="$filter"} ${@:4}); then
53-
if [[ ! -z "${GREP_REGEX}" ]]; then
52+
if result=$(gcloud "${group}" "${resource}" list --project="${PROJECT}" "${filter:+--filter="$filter"}" "${@:4}"); then
53+
if [[ -n "${GREP_REGEX:-}" ]]; then
5454
result=$(echo "${result}" | grep "${GREP_REGEX}" || true)
5555
fi
5656
echo "${result}"
5757
return
5858
fi
5959
echo -e "Attempt ${attempt} failed to list ${resource}. Retrying." >&2
60-
attempt=$(($attempt+1))
60+
attempt=$((attempt + 1))
6161
if [[ ${attempt} -gt 5 ]]; then
6262
echo -e "List ${resource} failed!" >&2
6363
exit 2
6464
fi
65-
sleep $((5*${attempt}))
65+
sleep $((5 * attempt))
6666
done
6767
}
6868

hack/.shellcheck_failures

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
./cluster/gce/gci/flexvolume_node_setup.sh
1212
./cluster/gce/gci/health-monitor.sh
1313
./cluster/gce/gci/master-helper.sh
14-
./cluster/gce/list-resources.sh
1514
./cluster/gce/upgrade-aliases.sh
1615
./cluster/gce/upgrade.sh
1716
./cluster/gce/util.sh

0 commit comments

Comments
 (0)