Skip to content

fix: bash arithmetic exit code in Redis migration script#834

Open
alexluong wants to merge 1 commit intomainfrom
fix/migrate-script-cmd-count
Open

fix: bash arithmetic exit code in Redis migration script#834
alexluong wants to merge 1 commit intomainfrom
fix/migrate-script-cmd-count

Conversation

@alexluong
Copy link
Copy Markdown
Collaborator

Summary

  • Fix (( CMD_COUNT++ )) causing the migration script to exit immediately under set -e. When CMD_COUNT is 0, post-increment (( 0++ )) evaluates to 0 (falsy), returning exit code 1, which set -e treats as a failure. Replaced all 5 occurrences with pre-increment (( ++CMD_COUNT )), which evaluates to 1 (truthy) on the first call.

Test plan

  • Run bash -n scripts/issue-680/migrate.sh to verify syntax
  • Run ./migrate.sh dry run against a Redis instance with at least one deployment to confirm CMD_COUNT increments correctly

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
outpost-docs Ready Ready Preview, Comment Apr 14, 2026 3:03pm
outpost-website Ready Ready Preview, Comment Apr 14, 2026 3:03pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants