Skip to content

Commit 7013ad8

Browse files
drnclaude
andcommitted
Fix merge script returning exit 1 on successful merge.
The print_summary function used `[[ -n "$VAR" ]] && echo` for optional output lines. When the variable was empty, the `[[ ]]` returned 1 and short-circuited — making 1 the script's exit code despite success. Replaced with if/then to avoid leaking exit codes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 062393c commit 7013ad8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

agents/skills/merge/scripts/merge.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ print_summary() {
211211
echo "pr: ${PR_URL}"
212212
echo "branch: ${BRANCH} → master"
213213
echo "commits: ${COMMIT_COUNT}"
214-
[[ -n "${MASTER_COMMIT:-}" ]] && echo "commit: ${MASTER_COMMIT}"
215-
[[ -n "${DOTS_SYNCED:-}" ]] && echo "~/.dots: synced → ${DOTS_SYNCED}"
214+
if [[ -n "${MASTER_COMMIT:-}" ]]; then echo "commit: ${MASTER_COMMIT}"; fi
215+
if [[ -n "${DOTS_SYNCED:-}" ]]; then echo "~/.dots: synced → ${DOTS_SYNCED}"; fi
216216
}
217217

218218
# --- Main ---

0 commit comments

Comments
 (0)