File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -34,18 +34,31 @@ echo "Executing git command with retry logic: $@"
34
34
until [[ " $TRY_NUM " -ge " $MAX_TRIES " ]]; do
35
35
" ${COMMAND[@]} " # Use "${COMMAND[@]}" to preserve arguments with quotes
36
36
EXIT_CODE=$?
37
+
38
+ # Log the command output and error messages
39
+ echo " Command output (stdout):"
40
+ cat " $OUTPUT_LOG "
41
+ echo " Command error (stderr):"
42
+ cat " $ERROR_LOG "
43
+
37
44
if [[ $EXIT_CODE == 0 ]]; then
45
+ echo " Command succeeded on attempt $TRY_NUM ."
38
46
break
39
47
elif [[ $EXIT_CODE == " $RETRY_ON_SIGNAL " ]]; then
40
48
echo " Failed with Exit Code $EXIT_CODE - try $TRY_NUM "
41
49
TRY_NUM=$(( ${TRY_NUM} + 1 ))
42
50
sleep $RETRY_WAIT
43
51
else
52
+ echo " Command failed with exit code $EXIT_CODE . No retry configured for this code."
53
+ echo " Failed command: ${COMMAND[*]} "
54
+ echo " Exit Code: $EXIT_CODE "
55
+ echo " Output Log: $OUTPUT_LOG "
56
+ echo " Error Log: $ERROR_LOG "
44
57
break
45
58
fi
46
- done
47
- return $EXIT_CODE
48
- )
59
+ done
60
+ return $EXIT_CODE
61
+ )
49
62
}
50
63
51
64
upsert_remote_alias () {
You can’t perform that action at this time.
0 commit comments