Skip to content

refactor(run_path): scope hook exit status to a single iteration#2552

Open
joshtrichards wants to merge 1 commit intomasterfrom
jtr/refactor-run-path-return-code
Open

refactor(run_path): scope hook exit status to a single iteration#2552
joshtrichards wants to merge 1 commit intomasterfrom
jtr/refactor-run-path-return-code

Conversation

@joshtrichards
Copy link
Member

Do not initialize and reuse return_code across the whole loop when it is only needed for the current script execution.

This is mostly a cleanup, but it also reduces the chance of accidentally acting on a stale non-zero status in future changes.

Limit return_code to the per-script failure path instead of keeping it as loop state.

This does not change current behavior, but makes the code easier to reason about and avoids future stale-state bugs if the loop logic is refactored.

Signed-off-by: Josh <[email protected]>
@joshtrichards joshtrichards requested a review from J0WI March 24, 2026 14:45
@joshtrichards joshtrichards added 3. to review Waiting for reviews feature: auto config (hooks) ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) labels Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews feature: auto config (hooks) ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant