Description
Bug Report
- Yes, I reviewed the contribution guidelines.
- Yes, more specifically, I reviewed the guidelines on how to write clear bug reports.
Describe the current, buggy behavior
wp theme update --all --exclude=foo
wp plugin update --all --exclude=foo
ParseThemeNameInput::check_optional_args_and_all
(same for plugin) will try to get update info via themes_api
for all themes/updates even the excluded ones.
This is a problem if the theme/plugin is excluded because it will make the updater crash e.g. if it hooks onto filter themes_api_args
in the themes_api
function, which leads to nothing getting updated
(since the add_filter function has a fatal error)
Describe what you would expect as the correct outcome
Don't check excluded plugins/themes for newer version/updates.
Let us know what environment you are running this on
WP CLI 2.10.0
Provide a possible solution
Change check_optional_args_and_all
to skip excluded in $all case?