Skip to content

Commit 05f35e9

Browse files
authored
Correct exit code assignment for command timeout
Fix exit code handling in command execution loop.
1 parent 1e3e56e commit 05f35e9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

rootfs/home/cloud-compose/profile.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ retry_until_success() {
1515
local RETRIES=0
1616

1717
while true; do
18-
timeout 300 "${command_to_run[@]}"
19-
local exit_code=$?
18+
exit_code=0
19+
timeout 300 "${command_to_run[@]}" || exit_code=$?
2020

2121
if [ "$exit_code" -eq 0 ]; then
2222
return 0

0 commit comments

Comments
 (0)