mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
cluster/gce: fix shell return value comparison.
In shell scripts inside [[ .. ]] blocks, ">" is a string comparison operator. The "attempt" number comparison works (most likely by accident) because the max number of attempts is below 10. Change to -gt operator.
This commit is contained in:
parent
d03b071d5b
commit
2226b1de09
@ -57,7 +57,7 @@ function gcloud-compute-list() {
|
||||
fi
|
||||
echo -e "Attempt ${attempt} failed to list ${resource}. Retrying." >&2
|
||||
attempt=$(($attempt+1))
|
||||
if [[ ${attempt} > 5 ]]; then
|
||||
if [[ ${attempt} -gt 5 ]]; then
|
||||
echo -e "List ${resource} failed!" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user