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:
Ismo Puustinen 2018-02-02 11:17:01 +02:00
parent d03b071d5b
commit 2226b1de09

View File

@ -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