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

Abort command execution on invalid onlyPlugin #823

Closed
5 tasks done
hanna-skryl opened this issue Sep 24, 2024 · 0 comments · Fixed by #828
Closed
5 tasks done

Abort command execution on invalid onlyPlugin #823

hanna-skryl opened this issue Sep 24, 2024 · 0 comments · Fixed by #828
Assignees
Labels
🧩 cli 🤓 UX UX improvement for CLI users

Comments

@hanna-skryl
Copy link
Collaborator

hanna-skryl commented Sep 24, 2024

User story

As a CLI user, I want the command to abort execution when none of the plugin slugs passed to the --onlyPlugins filtering option are valid so that I can correct my input and avoid unintended execution of all plugins.

For the --skipPlugins option, I want the command to continue execution, skipping the valid plugins specified and ignoring invalid plugins with a warning so that minor typos in skipPlugins do not prevent me from completing my task.

Acceptance criteria

  • Abort on invalid onlyPlugins
    • When none of the provided slugs are valid, the command aborts execution before running any plugins.
    • An error message is displayed.
  • Proceed with valid onlyPlugins
    • onlyPlugins can handle multiple slugs, so when at least one of the provided slugs is valid, the command should proceed.
    • Invalid plugin slugs are ignored.
    • A warning message is displayed.
  • Continue execution with invalid skipPlugins
    • The command proceeds to execute, skipping the valid plugins specified and ignoring invalid plugin slugs.
    • A warning message is displayed.
  • Handle combined onlyPlugins and skipPlugins input
    • When none of the onlyPlugins are valid, the command aborts execution with an error message.
    • When the skipPlugins filter is applied to the result of onlyPlugins filtering, and there are no plugins to run, the command aborts execution with a warning.
  • All error and warning messages should specify which plugin slugs are invalid and guide the user to correct their input.

Implementation details

validatePluginFilterOption can log the error and warning messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧩 cli 🤓 UX UX improvement for CLI users
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants