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

plugin hook errors are ignored #665

Closed
purplecabbage opened this issue May 2, 2023 · 1 comment · Fixed by #666
Closed

plugin hook errors are ignored #665

purplecabbage opened this issue May 2, 2023 · 1 comment · Fixed by #666
Assignees
Labels
bug Something isn't working

Comments

@purplecabbage
Copy link
Member

Describe the bug
When a we fire an oclif hook event it is handled by one or more cli plugin hook responder. If any of these hook responders encounters an error, it cannot exit the app and any exception it throws is quietly caught deep in oclif.
All OclifCommand calls to this.config.runHook('hook-id', <context-data>) are await-able, and return an object with 2 arrays, {failures[], successes[]}
We need to read failures and exit if appropriate.

To Reproduce
Steps to reproduce the behavior:

  1. write a hook responder that gets called
  2. throw an error from your hook responder
  3. observe that the cli command continues as if nothing happened

Expected behavior

  • clear log message identifying the plugin where the error occurred
  • clear log message identifying what went wrong and how to correct it
@purplecabbage purplecabbage self-assigned this May 2, 2023
@purplecabbage purplecabbage added the bug Something isn't working label May 3, 2023
@aiojbot
Copy link
Collaborator

aiojbot commented May 3, 2023

JIRA issue created: https://jira.corp.adobe.com/browse/ACNA-2240

@shazron shazron mentioned this issue May 3, 2023
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants