File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -89,9 +89,16 @@ if [[ -n "${INPUT_TARGET_BRANCH}" || "${INPUT_ADD_TIMESTAMP}" == "true" ]]; then
8989 if git show-ref --verify --quiet " refs/remotes/origin/${MAIN_BRANCH} " ; then
9090 echo " [INFO] Rebasing branch onto ${MAIN_BRANCH} ..."
9191 git rebase " origin/${MAIN_BRANCH} " || {
92- echo " [WARNING] Could not auto-rebase onto ${MAIN_BRANCH} . Branch may have conflicts."
93- echo " [INFO] Attempting to abort rebase and continue with current state..."
94- git rebase --abort 2> /dev/null || true
92+ echo " [ERROR] Rebase onto ${MAIN_BRANCH} failed. This may indicate conflicts or other issues."
93+ echo " [INFO] Attempting to abort the rebase..."
94+ if git rebase --abort 2> /dev/null; then
95+ echo " [INFO] Rebase aborted successfully. The branch is in its pre-rebase state."
96+ echo " [INFO] Please resolve any conflicts manually and reattempt the rebase if necessary."
97+ else
98+ echo " [ERROR] Failed to abort the rebase. The repository may be in an inconsistent state."
99+ echo " [INFO] Please inspect the repository and resolve any issues manually."
100+ exit 1
101+ fi
95102 }
96103 fi
97104 else
You can’t perform that action at this time.
0 commit comments