Skip to content

Commit

Permalink
test: fix tenacious word splitting of array elements
Browse files Browse the repository at this point in the history
Signed-off-by: Joachim Wiberg <[email protected]>
  • Loading branch information
troglobit committed Jan 2, 2025
1 parent cf19c83 commit 4ee5428
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,13 @@ run_step()
fi
}

# shellcheck disable=SC2068,SC2086
tenacious()
{
timeout=$1
shift

while [ $timeout -gt 0 ]; do
$@ && return
while [ "$timeout" -gt 0 ]; do
"$@" && return
timeout=$((timeout - 1))
sleep 1
done
Expand Down

0 comments on commit 4ee5428

Please sign in to comment.