Skip to content

Commit 3119dc4

Browse files
Update entrypoint.sh
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 15c82fd commit 3119dc4

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

entrypoint.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)