Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hook to always run before termination #1275

Closed
Mnkras opened this issue Dec 20, 2024 · 1 comment · Fixed by #1276
Closed

Hook to always run before termination #1275

Mnkras opened this issue Dec 20, 2024 · 1 comment · Fixed by #1276
Labels
enhancement New feature or request

Comments

@Mnkras
Copy link

Mnkras commented Dec 20, 2024

Is your feature request related to a problem? Please describe.
Today there are several hooks that will execute at different lifecycles of a command, but there doesn't seem to be a way to always hook into after the CLI is executed. I want to flush telemetry data, but can't find a great way to do that with the current hooks.

Describe the solution you'd like
A new hook that will always execute before the CLI exits

Describe alternatives you've considered
I am hooked into the following hooks

      "postrun": "./dist/hooks/postrun/nfa-flush",
      "command_not_found": "./dist/hooks/postrun/nfa-flush",
      "command_incomplete": "./dist/hooks/postrun/nfa-flush"

but if you don't enter a command, or enter an invalid command (eg missing arg) those don't execute

@mdonnalley mdonnalley transferred this issue from oclif/oclif Dec 20, 2024
@mdonnalley mdonnalley added the enhancement New feature or request label Dec 20, 2024
Copy link

git2gus bot commented Dec 20, 2024

This issue has been linked to a new work item: W-17482601

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants