File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -33,19 +33,20 @@ while [ $attempt -le "$max_retries" ]; do
3333 echo " Command: $command "
3434 echo " Working directory: $( pwd) "
3535
36- if eval " $command " ; then
36+ eval " $command "
37+ exit_code=$?
38+ if [ $exit_code -eq 0 ]; then
3739 echo " Command succeeded on attempt $attempt "
3840 exit 0
3941 fi
4042
41- exit_code=$?
4243 if [ $attempt -lt " $max_retries " ]; then
4344 echo " Command failed (exit code: $exit_code ). Retrying in ${current_delay} s..."
4445 sleep " $current_delay "
4546 current_delay=$(( current_delay * 2 )) # Exponential backoff
4647 attempt=$(( attempt + 1 ))
4748 else
48- echo " Command failed after $max_retries attempts"
49+ echo " Command failed after $max_retries attempts with exit code: $exit_code "
4950 exit $exit_code
5051 fi
5152done
Original file line number Diff line number Diff line change 6666 run : |
6767 max_retries=5
6868 retry_delay=10
69- ./.ci/scripts/retry.sh "$max_retries" "$retry_delay" './bin/hermit env --raw >> "$GITHUB_ENV"'
69+ ./.ci/scripts/retry.sh "$max_retries" "$retry_delay" './bin/hermit env --raw' >> "$GITHUB_ENV"
7070
7171 # in case of cache miss, an older instance of cache could be selected (with restore-keys).
7272 # Clean hermit packages to avoid continuously size increment of folder ~/.cache/hermit/pkg.
You can’t perform that action at this time.
0 commit comments