Skip to content

Add help_wp_die_handler. Remove special help treatment for config and db (#4266).#4285

Merged
danielbachhuber merged 3 commits intomasterfrom
suggest_help
Aug 10, 2017
Merged

Add help_wp_die_handler. Remove special help treatment for config and db (#4266).#4285
danielbachhuber merged 3 commits intomasterfrom
suggest_help

Conversation

@gitlost
Copy link
Contributor

@gitlost gitlost commented Aug 10, 2017

PR #4266 and issue #4265

Adds a help_wp_die_handler to try to trap errors during WP load, especially db select fails when have a partial WP install. (See https://github.com/wp-cli/wp-cli/blob/master/features/help.feature#L49).

(It could also be used to get wp core is-installed to work in this situation if a check were added to that command to see if WP function wp_cache_get() exists before calling is_blog_installed() but don't know if it's worth it?)

Removes the special handling for help config and help db, but expands the special handling for help core install/multisite-install/verify-checksum/version to all help command subcommands on "First try at showing man page" as if they exist the help will be correct (unlike in the help command case where extra subcommands could be added).

Adds some extra tests to cover these situations, and also to cover help on disabled command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants