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

WP_CLI::error() doesn't always terminate #213

Open
johnbillion opened this issue Feb 26, 2024 · 2 comments
Open

WP_CLI::error() doesn't always terminate #213

johnbillion opened this issue Feb 26, 2024 · 2 comments

Comments

@johnbillion
Copy link
Sponsor Contributor

The WP_CLI::error() method is marked as an early terminating method, but it doesn't terminate if the $exit parameter is set to false.

Its entry in the earlyTerminatingMethodCalls config should be removed and replaced with something else that's conditional, but I'm not sure what.

@szepeviktor
Copy link
Owner

szepeviktor commented Feb 26, 2024

I tell you not to use that $exit parameter.
Just like

- Do not enable `exit_error` in `WP_CLI::launch` or `WP_CLI::runcommand` to keep your code testable

It feels really-really bad to handle these parts of WordPress.
That is all I could contribute.

@herndlm
Copy link
Contributor

herndlm commented Feb 26, 2024

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

No branches or pull requests

3 participants