Skip to content

Run post hook when _on_before_issue() errors#6445

Merged
neilpang merged 1 commit into
acmesh-official:devfrom
davidjb:onbeforeissue-error-handling
Jul 13, 2025
Merged

Run post hook when _on_before_issue() errors#6445
neilpang merged 1 commit into
acmesh-official:devfrom
davidjb:onbeforeissue-error-handling

Conversation

@davidjb

@davidjb davidjb commented Jul 13, 2025

Copy link
Copy Markdown
Contributor

The call to _on_before_issue() within issue() runs the $_pre_hook, but when _on_before_issue() fails (e.g. standalone mode, port is already occupied), the $_post_hook is never called. This creates a disparity as there's no opportunity to clean up after a failure; if the pre hook makes a system change, the system is left in an inconsistent state.

This PR adds the same post hook error handling, as per the rest of the issue() function's calls happen.

@neilpang neilpang merged commit 365ec1f into acmesh-official:dev Jul 13, 2025
32 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.

2 participants