diff --git a/ops/extract-cron.sh b/ops/extract-cron.sh index 70bd3fb8..9daf88ff 100755 --- a/ops/extract-cron.sh +++ b/ops/extract-cron.sh @@ -152,6 +152,7 @@ IMPORTANT: Use the Edit tool to update the source file status. Use the Write too --permission-mode bypassPermissions \ >> "$LOG" 2>&1 || { log "WARN: Claude extraction failed or timed out for $SOURCE_FILE" + sed -i "\|^${SOURCE_FILE}$|d" "$PENDING_FILE" git checkout main >> "$LOG" 2>&1 continue } @@ -160,6 +161,7 @@ IMPORTANT: Use the Edit tool to update the source file status. Use the Write too CHANGED_FILES=$(git status --porcelain) if [ -z "$CHANGED_FILES" ]; then log "No changes produced for $SOURCE_FILE" + sed -i "\|^${SOURCE_FILE}$|d" "$PENDING_FILE" git checkout main >> "$LOG" 2>&1 continue fi @@ -179,6 +181,7 @@ IMPORTANT: Use the Edit tool to update the source file status. Use the Write too # Check if anything was staged if git diff --cached --quiet; then log "No valid changes to commit for $SOURCE_FILE" + sed -i "\|^${SOURCE_FILE}$|d" "$PENDING_FILE" git checkout -- . >> "$LOG" 2>&1 git checkout main >> "$LOG" 2>&1 continue