From 070168022ed7867006d0f114d0b80419d7efec21 Mon Sep 17 00:00:00 2001 From: Alex Luong Date: Tue, 14 Apr 2026 22:02:28 +0700 Subject: [PATCH] fix: use pre-increment in migrate.sh to avoid set -e exit Co-Authored-By: Claude --- scripts/issue-680/migrate.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/issue-680/migrate.sh b/scripts/issue-680/migrate.sh index 4bd0a465..dd08c41c 100755 --- a/scripts/issue-680/migrate.sh +++ b/scripts/issue-680/migrate.sh @@ -164,7 +164,7 @@ for DEPLOY_ID in "${DEPLOYMENT_IDS[@]}"; do if [[ -n "$INSTALLATION_ID" ]]; then target_key="${DEPLOY_ID}:outpost:installation_id" echo "SET ${target_key} ${INSTALLATION_ID}" >> "$PIPE_FILE" - ((CMD_COUNT++)) + ((++CMD_COUNT)) fi # Migration status keys (HSET is idempotent) @@ -173,7 +173,7 @@ for DEPLOY_ID in "${DEPLOYMENT_IDS[@]}"; do hash_data="${MIGRATION_DATA[$old_key]}" if [[ -n "$hash_data" ]]; then echo "HSET ${new_key} ${hash_data}" >> "$PIPE_FILE" - ((CMD_COUNT++)) + ((++CMD_COUNT)) fi done done @@ -182,15 +182,15 @@ done if $CLEANUP; then if [[ -n "$INSTALLATION_ID" ]]; then echo "DEL outpostrc" >> "$PIPE_FILE" - ((CMD_COUNT++)) + ((++CMD_COUNT)) fi for key in "${MIGRATION_KEYS[@]}"; do echo "DEL ${key}" >> "$PIPE_FILE" - ((CMD_COUNT++)) + ((++CMD_COUNT)) done if [[ "$LOCK_EXISTS" == "1" ]]; then echo "DEL .outpost:migration:lock" >> "$PIPE_FILE" - ((CMD_COUNT++)) + ((++CMD_COUNT)) fi fi