test/commit: Simplify a 'for' loop

An ascending 'for' loop is more idiomatic than its descending
counterpart.

https://github.com/containers/toolbox/pull/1373
This commit is contained in:
Debarshi Ray 2023-09-21 18:37:23 +02:00
parent 5c0372e959
commit c586cc9278

View file

@ -107,7 +107,7 @@ function _pull_and_cache_distro_image() {
assert_success assert_success
fi fi
for ((i = num_of_retries; i > 0; i--)); do for ((i = 0; i < num_of_retries; i++)); do
run "$SKOPEO" copy --dest-compress "docker://${image}" "dir:${IMAGE_CACHE_DIR}/${image_archive}" run "$SKOPEO" copy --dest-compress "docker://${image}" "dir:${IMAGE_CACHE_DIR}/${image_archive}"
if [ "$status" -eq 0 ]; then if [ "$status" -eq 0 ]; then