Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion run/markdown-preview/editor/test/retry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ do
if ((attempt_num==max_attempts))
then
echo "Attempt $attempt_num / $max_attempts failed! No more retries left!"
exit
exit 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Adding exit 1 here ensures that the script returns a failure status when all retries are exhausted. This is important for signaling to calling scripts that the operation failed after multiple attempts.

Consider adding a comment explaining why exit 1 is used here for clarity.

Suggested change
echo "Attempt $attempt_num / $max_attempts failed! No more retries left!"
exit
exit 1
exit 1 # Exit with a non-zero status code to indicate failure after max retries

else
echo "Attempt $attempt_num / $max_attempts failed!"
sleep $((attempt_num++))
Expand Down
2 changes: 1 addition & 1 deletion run/markdown-preview/renderer/test/retry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ do
if ((attempt_num==max_attempts))
then
echo "Attempt $attempt_num / $max_attempts failed! No more retries left!"
exit
exit 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similar to the other retry.sh file, adding exit 1 here is essential for proper error signaling. A non-zero exit code indicates that the retried operation ultimately failed.

Consider adding a comment explaining why exit 1 is used here for clarity.

Suggested change
echo "Attempt $attempt_num / $max_attempts failed! No more retries left!"
exit
exit 1
exit 1 # Exit with a non-zero status code to indicate failure after max retries

else
echo "Attempt $attempt_num / $max_attempts failed!"
sleep $((attempt_num++))
Expand Down
Loading