Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions features/help.feature
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,21 @@ Feature: Get help about WP-CLI commands
Path to the WordPress files.
"""

When I run `WP_CLI_SUPPRESS_GLOBAL_PARAMS=false wp help`
Then STDOUT should contain:
"""
GLOBAL PARAMETERS
"""

And STDOUT should contain:
"""
--path
"""
And STDOUT should contain:
"""
Path to the WordPress files.
"""

# Prior to WP 4.3 widgets & others used PHP 4 style constructors and prior to WP 3.9 wpdb used the mysql extension which can all lead (depending on PHP version) to PHP Deprecated notices.
@require-wp-4.3
Scenario: Help for internal commands with WP
Expand Down
2 changes: 1 addition & 1 deletion php/WP_CLI/Dispatcher/CompositeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ protected function get_global_params( $root_command = false ) {
}

// Check if global parameters synopsis should be displayed or not.
if ( true !== (bool) getenv( 'WP_CLI_SUPPRESS_GLOBAL_PARAMS' ) ) {
if ( 'true' !== getenv( 'WP_CLI_SUPPRESS_GLOBAL_PARAMS' ) ) {
$binding['parameters'][] = array(
'synopsis' => $synopsis,
'desc' => $details['desc'],
Expand Down