Skip to content

Fix closed PR output lost in pipe subshell#555

Merged
cguldner merged 1 commit into
dropbox:mainfrom
cguldner:fix-close-prs-subshell
Jul 17, 2026
Merged

Fix closed PR output lost in pipe subshell#555
cguldner merged 1 commit into
dropbox:mainfrom
cguldner:fix-close-prs-subshell

Conversation

@cguldner

Copy link
Copy Markdown
Contributor

Summary

  • The pipe-to-while pattern (cmd | while read) runs the loop in a subshell, so the closed variable was always empty when written to GITHUB_OUTPUT
  • Use process substitution (< <(cmd)) so the loop runs in the current shell and the output is preserved
  • Add shell: bash since process substitution requires bash

Test plan

  • Trigger the workflow with an existing open spec-update PR
  • Verify the "Comment on closed PRs" step is no longer skipped

🤖 Generated with Claude Code

The pipe-to-while pattern runs the loop in a subshell, so the
closed variable was always empty when written to GITHUB_OUTPUT.
Use process substitution instead so the loop runs in the current
shell.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cguldner
cguldner enabled auto-merge (squash) July 17, 2026 19:15
@cguldner
cguldner merged commit 5bbbb31 into dropbox:main Jul 17, 2026
22 checks passed
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.

1 participant