Skip to content

Conversation

cb1kenobi
Copy link
Contributor

@cb1kenobi cb1kenobi commented Oct 10, 2025

If a command has a non-callback, async run() implementation, then the post-execute hook is never fired.

For example, the SDK's cli/commands/_build.js exports an async function run(logger, config, cli, finished) function. If the supplied finished() callback is fired, then it emits the event, but if the SDK were to remove the seemingly useless finished() callback, then the post-execute hook is never fired.

To my knowledge, nothing actually listens to the post-execute hook event.

@cb1kenobi cb1kenobi requested a review from m1ga October 10, 2025 21:42
Copy link
Contributor

@m1ga m1ga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forgot to approve this.
Looks good, not a hook user and I only find it in two places:
https://grep.app/search?q=cli%3Apost-execute

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