Add help_wp_die_handler. Remove special help treatment for config and db (#4266).#4285
Merged
danielbachhuber merged 3 commits intomasterfrom Aug 10, 2017
Merged
Add help_wp_die_handler. Remove special help treatment for config and db (#4266).#4285danielbachhuber merged 3 commits intomasterfrom
danielbachhuber merged 3 commits intomasterfrom
Conversation
danielbachhuber
approved these changes
Aug 10, 2017
This was referenced Aug 16, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #4266 and issue #4265
Adds a
help_wp_die_handlerto 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-installedto work in this situation if a check were added to that command to see if WP functionwp_cache_get()exists before callingis_blog_installed()but don't know if it's worth it?)Removes the special handling for
help configandhelp db, but expands the special handling forhelp core install/multisite-install/verify-checksum/versionto allhelp command subcommands on "First try at showing man page" as if they exist the help will be correct (unlike in thehelp commandcase where extra subcommands could be added).Adds some extra tests to cover these situations, and also to cover help on disabled command.