From 20200566c77846cdb49a0a899195138e5d910877 Mon Sep 17 00:00:00 2001 From: Saul Baizman Date: Wed, 14 Feb 2024 12:18:16 -0500 Subject: [PATCH 1/9] =?UTF-8?q?Add=20=E2=80=94force-check=20flag=20to=20wp?= =?UTF-8?q?=20plugin=20list=20and=20wp=20theme=20list.=20(wip)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- features/plugin-list.feature | 71 +++++++++++++++++++++++++++++++ features/theme-list.feature | 27 ++++++++++++ src/Plugin_Command.php | 3 ++ src/Theme_Command.php | 3 ++ src/WP_CLI/CommandWithUpgrade.php | 5 +++ 5 files changed, 109 insertions(+) create mode 100644 features/plugin-list.feature create mode 100644 features/theme-list.feature diff --git a/features/plugin-list.feature b/features/plugin-list.feature new file mode 100644 index 00000000..d58a8d33 --- /dev/null +++ b/features/plugin-list.feature @@ -0,0 +1,71 @@ +Feature: List WordPress plugins + + Background: + Given a WP install + And I run `wp plugin uninstall --all` + And I run `wp plugin install hello-dolly` + And a setup.php file: + """ + no_update["hello-dolly/hello.php"]->new_version = $fake_version; + $return = set_site_transient( 'update_plugins', $plugin_transient ); + """ +# And a wp-content/mu-plugins/test-plugin-update.php file: +# """ +# response['hello-dolly/hello.php'] ); +# $value->no_update['hello-dolly/hello.php']->new_version = $fake_version; +# +# return $value; +# } ); +# ?> +# """ + + Scenario: Refresh update_plugins transient when listing plugins with --force-check flag + + # Listing the plugins will populate the transient in the database + When I run `wp plugin list` + Then STDOUT should not be empty + And save STDOUT as {PLUGIN_LIST_ORIGINAL_VERSIONS} + + # Write a test value + When I run `wp eval-file setup.php` + Then STDOUT should be empty + + # Get value of plugin transient + #When I run `wp option get _site_transient_update_plugins` + #Then STDOUT should be empty + + # Run list again + When I run `wp plugin list` + Then STDOUT should be empty + And save STDOUT as {PLUGIN_LIST_FAKE_VERSIONS} + + # TODO: compare {PLUGIN_LIST_ORIGINAL_VERSIONS} to {PLUGIN_LIST_FAKE_VERSIONS} + # expected result: they should be different + + # Get value of plugin transient + When I run `wp option get _site_transient_update_plugins` + Then STDOUT should be empty + + When I run `wp plugin list --force-check` + Then STDOUT should not be empty + And save STDOUT as {PLUGIN_LIST_FORCE_CHECK_VERSIONS} + + # TODO: compare {PLUGIN_LIST_ORIGINAL_VERSIONS} to {PLUGIN_LIST_FORCE_CHECK_VERSIONS} + # expected result: they should be the same diff --git a/features/theme-list.feature b/features/theme-list.feature new file mode 100644 index 00000000..5d873533 --- /dev/null +++ b/features/theme-list.feature @@ -0,0 +1,27 @@ +Feature: List WordPress themes + + Background: + Given a WP install + And a setup.php file: + """ + last_checked = time(); + $theme_transient->checked = []; + $theme_transient->response = []; + $theme_transient->no_update = []; + $theme_transient->translations = []; + $return = update_option( '_site_transient_update_themes', $theme_transient ); + """ + And I run `wp transient delete update_themes --network` + + Scenario: Refresh update_themes transient when listing themes with --force-check flag + + # Listing the themes will populate the transient in the database + When I run `wp theme list` + Then STDOUT should not be empty + + When I run `wp transient set update_themes test_value --network` + And I run `wp theme list --force-check` + + Then STDOUT should be empty diff --git a/src/Plugin_Command.php b/src/Plugin_Command.php index 935d4b44..17c0c36b 100644 --- a/src/Plugin_Command.php +++ b/src/Plugin_Command.php @@ -1325,6 +1325,9 @@ public function delete( $args, $assoc_args = array() ) { * [--skip-update-check] * : If set, the plugin update check will be skipped. * + * [--force-check] + * : Bypass the transient cache and force a fresh update check. + * * [--recently-active] * : If set, only recently active plugins will be shown and the status filter will be ignored. * diff --git a/src/Theme_Command.php b/src/Theme_Command.php index 19bf71b0..eb2862a6 100644 --- a/src/Theme_Command.php +++ b/src/Theme_Command.php @@ -857,6 +857,9 @@ public function delete( $args, $assoc_args ) { * [--skip-update-check] * : If set, the theme update check will be skipped. * + * [--force-check] + * : Bypass the transient cache and force a fresh update check. + * * ## AVAILABLE FIELDS * * These fields will be displayed by default for each theme: diff --git a/src/WP_CLI/CommandWithUpgrade.php b/src/WP_CLI/CommandWithUpgrade.php index d925aeb2..9fc0cd2d 100755 --- a/src/WP_CLI/CommandWithUpgrade.php +++ b/src/WP_CLI/CommandWithUpgrade.php @@ -532,6 +532,11 @@ static function ( $result ) { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore -- Whitelisting to provide backward compatibility to classes possibly extending this class. protected function _list( $_, $assoc_args ) { + // If `--force-check` flag is present, delete the ${item_type} transient. + if ( true === (bool) Utils\get_flag_value( $assoc_args, 'force-check', false ) ) { + delete_site_transient( $this->item_type . 's' ); + } + // Force WordPress to check for updates if `--skip-update-check` is not passed. if ( false === (bool) Utils\get_flag_value( $assoc_args, 'skip-update-check', false ) ) { call_user_func( $this->upgrade_refresh ); From f5101e4ab66856fec32641b15df9c8d2d48431df Mon Sep 17 00:00:00 2001 From: Daniel Bachhuber Date: Sun, 3 Mar 2024 08:50:55 -0800 Subject: [PATCH 2/9] Refactor Behat tests --- features/plugin-list.feature | 105 +++++++++++++++-------------------- 1 file changed, 45 insertions(+), 60 deletions(-) diff --git a/features/plugin-list.feature b/features/plugin-list.feature index d58a8d33..bd145eea 100644 --- a/features/plugin-list.feature +++ b/features/plugin-list.feature @@ -1,71 +1,56 @@ Feature: List WordPress plugins - Background: + Scenario: Refresh update_plugins transient when listing plugins with --force-check flag Given a WP install And I run `wp plugin uninstall --all` And I run `wp plugin install hello-dolly` - And a setup.php file: + And a update-transient.php file: """ no_update["hello-dolly/hello.php"]->new_version = $fake_version; - $return = set_site_transient( 'update_plugins', $plugin_transient ); + $transient = get_site_transient( 'update_plugins' ); + $transient->response['hello-dolly/hello.php'] = (object) array( + 'id' => 'w.org/plugins/hello-dolly', + 'slug' => 'hello-dolly', + 'plugin' => 'hello-dolly/hello.php', + 'new_version' => '100.0.0', + 'url' => 'https://wordpress.org/plugins/hello-dolly/', + 'package' => 'https://downloads.wordpress.org/plugin/hello-dolly.100.0.0.zip', + ); + $transient->checked = array( + 'hello-dolly/hello.php' => '1.7.2', + ); + unset( $transient->no_update['hello-dolly/hello.php'] ); + set_site_transient( 'update_plugins', $transient ); + WP_CLI::success( 'Transient updated.' ); """ -# And a wp-content/mu-plugins/test-plugin-update.php file: -# """ -# response['hello-dolly/hello.php'] ); -# $value->no_update['hello-dolly/hello.php']->new_version = $fake_version; -# -# return $value; -# } ); -# ?> -# """ - - Scenario: Refresh update_plugins transient when listing plugins with --force-check flag - - # Listing the plugins will populate the transient in the database - When I run `wp plugin list` - Then STDOUT should not be empty - And save STDOUT as {PLUGIN_LIST_ORIGINAL_VERSIONS} - - # Write a test value - When I run `wp eval-file setup.php` - Then STDOUT should be empty - # Get value of plugin transient - #When I run `wp option get _site_transient_update_plugins` - #Then STDOUT should be empty + # Populates the initial transient in the database + When I run `wp plugin list --fields=name,status,update` + Then STDOUT should be a table containing rows: + | name | status | update | + | hello-dolly | inactive | none | - # Run list again - When I run `wp plugin list` - Then STDOUT should be empty - And save STDOUT as {PLUGIN_LIST_FAKE_VERSIONS} - - # TODO: compare {PLUGIN_LIST_ORIGINAL_VERSIONS} to {PLUGIN_LIST_FAKE_VERSIONS} - # expected result: they should be different - - # Get value of plugin transient - When I run `wp option get _site_transient_update_plugins` - Then STDOUT should be empty - - When I run `wp plugin list --force-check` - Then STDOUT should not be empty - And save STDOUT as {PLUGIN_LIST_FORCE_CHECK_VERSIONS} + # Modify the transient in the database to simulate an update + When I run `wp eval-file update-transient.php` + Then STDOUT should be: + """ + Success: Transient updated. + """ - # TODO: compare {PLUGIN_LIST_ORIGINAL_VERSIONS} to {PLUGIN_LIST_FORCE_CHECK_VERSIONS} - # expected result: they should be the same + # Verify the fake transient value produces the expected output + When I run `wp plugin list --fields=name,status,update` + Then STDOUT should be a table containing rows: + | name | status | update | + | hello-dolly | inactive | available | + + # Repeating the same command again should produce the same results + When I run `wp plugin list --fields=name,status,update` + Then STDOUT should be a table containing rows: + | name | status | update | + | hello-dolly | inactive | available | + + # Using the --force-check flag should refresh the transient back to the original value + When I run `wp plugin list --fields=name,status,update --force-check` + Then STDOUT should be a table containing rows: + | name | status | update | + | hello-dolly | inactive | none | \ No newline at end of file From a0ad1956e0da98b1b7b561c52285929bc38d015a Mon Sep 17 00:00:00 2001 From: Daniel Bachhuber Date: Sun, 3 Mar 2024 08:51:04 -0800 Subject: [PATCH 3/9] Actually delete the correct upgrade transient --- src/WP_CLI/CommandWithUpgrade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/WP_CLI/CommandWithUpgrade.php b/src/WP_CLI/CommandWithUpgrade.php index 9fc0cd2d..31c2e436 100755 --- a/src/WP_CLI/CommandWithUpgrade.php +++ b/src/WP_CLI/CommandWithUpgrade.php @@ -532,9 +532,9 @@ static function ( $result ) { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore -- Whitelisting to provide backward compatibility to classes possibly extending this class. protected function _list( $_, $assoc_args ) { - // If `--force-check` flag is present, delete the ${item_type} transient. + // If `--force-check` flag is present, delete the upgrade transient. if ( true === (bool) Utils\get_flag_value( $assoc_args, 'force-check', false ) ) { - delete_site_transient( $this->item_type . 's' ); + delete_site_transient( $this->upgrade_transient ); } // Force WordPress to check for updates if `--skip-update-check` is not passed. From c815ae4b8a0a2f38338b83e172dbaab9bc7e9fdc Mon Sep 17 00:00:00 2001 From: Saul Baizman Date: Mon, 6 May 2024 23:41:24 -0400 Subject: [PATCH 4/9] Add test for the simultaneous presence of `--force-check` and `--skip-update-check`. Signed-off-by: Saul Baizman --- src/WP_CLI/CommandWithUpgrade.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/WP_CLI/CommandWithUpgrade.php b/src/WP_CLI/CommandWithUpgrade.php index 31c2e436..50a3dc63 100755 --- a/src/WP_CLI/CommandWithUpgrade.php +++ b/src/WP_CLI/CommandWithUpgrade.php @@ -532,6 +532,11 @@ static function ( $result ) { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore -- Whitelisting to provide backward compatibility to classes possibly extending this class. protected function _list( $_, $assoc_args ) { + // If `--force-check` and `--skip-update-check` flags are both present, abort. + if ( true === (bool) Utils\get_flag_value( $assoc_args, 'force-check', false ) and true === (bool) Utils\get_flag_value( $assoc_args, 'skip-update-check', false ) ) { + WP_CLI::error("{$this->item_type} updates cannot be both force-checked and skipped. Choose one."); + } + // If `--force-check` flag is present, delete the upgrade transient. if ( true === (bool) Utils\get_flag_value( $assoc_args, 'force-check', false ) ) { delete_site_transient( $this->upgrade_transient ); From 50c4a75026083db871b50cec8d7c95869a1289f9 Mon Sep 17 00:00:00 2001 From: Saul Baizman Date: Tue, 7 May 2024 01:06:59 -0400 Subject: [PATCH 5/9] Add another test to plugin-list.feature. Signed-off-by: Saul Baizman --- features/plugin-list.feature | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/features/plugin-list.feature b/features/plugin-list.feature index bd145eea..176eb702 100644 --- a/features/plugin-list.feature +++ b/features/plugin-list.feature @@ -53,4 +53,12 @@ Feature: List WordPress plugins When I run `wp plugin list --fields=name,status,update --force-check` Then STDOUT should be a table containing rows: | name | status | update | - | hello-dolly | inactive | none | \ No newline at end of file + | hello-dolly | inactive | none | + + When I try `wp plugin list --skip-update-check --force-check` + Then STDERR should contain: + """ + Error: plugin updates cannot be both force-checked and skipped. Choose one. + """ + And STDOUT should be empty + And the return code should be 1 From 58db5c90812404b489d47ce0dd453b242adf5218 Mon Sep 17 00:00:00 2001 From: Saul Baizman Date: Tue, 7 May 2024 01:11:23 -0400 Subject: [PATCH 6/9] Revise the tests in theme-list.feature. Signed-off-by: Saul Baizman --- features/theme-list.feature | 71 ++++++++++++++++++++++++++++--------- 1 file changed, 54 insertions(+), 17 deletions(-) diff --git a/features/theme-list.feature b/features/theme-list.feature index 5d873533..55e3b5e0 100644 --- a/features/theme-list.feature +++ b/features/theme-list.feature @@ -1,27 +1,64 @@ Feature: List WordPress themes - Background: + Scenario: Refresh update_themes transient when listing themes with --force-check flag Given a WP install - And a setup.php file: + And I run `wp theme delete --all --force` + And I run `wp theme install --force twentytwentyfour --version=1.1` + And a update-transient.php file: """ last_checked = time(); - $theme_transient->checked = []; - $theme_transient->response = []; - $theme_transient->no_update = []; - $theme_transient->translations = []; - $return = update_option( '_site_transient_update_themes', $theme_transient ); + $transient = get_site_transient( 'update_themes' ); + $transient->response['twentytwentyfour'] = (object) array( + 'theme' => 'twentytwentyfour', + 'new_version' => '100.0.0', + 'url' => 'https://wordpress.org/themes/twentytwentyfour/', + 'package' => 'https://downloads.wordpress.org/theme/twentytwentyfour.100.zip', + 'requires' => '6.4', + 'requires_php' => '7.0' + ); + $transient->checked = array( + 'twentytwentyfour' => '1.1', + ); + unset( $transient->no_update['twentytwentyfour'] ); + set_site_transient( 'update_themes', $transient ); + WP_CLI::success( 'Transient updated.' ); """ - And I run `wp transient delete update_themes --network` - Scenario: Refresh update_themes transient when listing themes with --force-check flag + # Populates the initial transient in the database + When I run `wp theme list --fields=name,status,update` + Then STDOUT should be a table containing rows: + | name | status | update | + | twentytwentyfour | active | none | + + # Modify the transient in the database to simulate an update + When I run `wp eval-file update-transient.php` + Then STDOUT should be: + """ + Success: Transient updated. + """ + + # Verify the fake transient value produces the expected output + When I run `wp theme list --fields=name,status,update` + Then STDOUT should be a table containing rows: + | name | status | update | + | twentytwentyfour | active | available | - # Listing the themes will populate the transient in the database - When I run `wp theme list` - Then STDOUT should not be empty + # Repeating the same command again should produce the same results + When I run `wp theme list --fields=name,status,update` + Then STDOUT should be a table containing rows: + | name | status | update | + | twentytwentyfour | active | available | - When I run `wp transient set update_themes test_value --network` - And I run `wp theme list --force-check` + # Using the --force-check flag should refresh the transient back to the original value + When I run `wp theme list --fields=name,status,update --force-check` + Then STDOUT should be a table containing rows: + | name | status | update | + | twentytwentyfour | active | none | - Then STDOUT should be empty + When I try `wp theme list --skip-update-check --force-check` + Then STDERR should contain: + """ + Error: theme updates cannot be both force-checked and skipped. Choose one. + """ + And STDOUT should be empty + And the return code should be 1 From 3c853c9a66631ab7aa8072b42fa6ea054acf8a2e Mon Sep 17 00:00:00 2001 From: Saul Baizman Date: Tue, 7 May 2024 21:04:01 -0400 Subject: [PATCH 7/9] =?UTF-8?q?Modified=20files=20to=20respond=20to=20@ern?= =?UTF-8?q?ilambar=E2=80=99s=20feedback.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Saul Baizman --- features/theme-list.feature | 40 +++++++++++++++---------------- src/Plugin_Command.php | 2 +- src/WP_CLI/CommandWithUpgrade.php | 4 ++-- 3 files changed, 22 insertions(+), 24 deletions(-) diff --git a/features/theme-list.feature b/features/theme-list.feature index 55e3b5e0..eab6a82d 100644 --- a/features/theme-list.feature +++ b/features/theme-list.feature @@ -3,32 +3,30 @@ Feature: List WordPress themes Scenario: Refresh update_themes transient when listing themes with --force-check flag Given a WP install And I run `wp theme delete --all --force` - And I run `wp theme install --force twentytwentyfour --version=1.1` + And I run `wp theme install --force twentytwelve --version=4.2` And a update-transient.php file: """ response['twentytwentyfour'] = (object) array( - 'theme' => 'twentytwentyfour', + $transient->response['twentytwelve'] = (object) array( + 'theme' => 'twentytwelve', 'new_version' => '100.0.0', - 'url' => 'https://wordpress.org/themes/twentytwentyfour/', - 'package' => 'https://downloads.wordpress.org/theme/twentytwentyfour.100.zip', - 'requires' => '6.4', - 'requires_php' => '7.0' + 'url' => 'https://wordpress.org/themes/twentytwelve/', + 'package' => 'https://downloads.wordpress.org/theme/twentytwelve.100.zip' ); $transient->checked = array( - 'twentytwentyfour' => '1.1', + 'twentytwelve' => '4.2', ); - unset( $transient->no_update['twentytwentyfour'] ); + unset( $transient->no_update['twentytwelve'] ); set_site_transient( 'update_themes', $transient ); WP_CLI::success( 'Transient updated.' ); """ # Populates the initial transient in the database - When I run `wp theme list --fields=name,status,update` + When I run `wp theme list --fields=name,update` Then STDOUT should be a table containing rows: - | name | status | update | - | twentytwentyfour | active | none | + | name | update | + | twentytwelve | none | # Modify the transient in the database to simulate an update When I run `wp eval-file update-transient.php` @@ -38,22 +36,22 @@ Feature: List WordPress themes """ # Verify the fake transient value produces the expected output - When I run `wp theme list --fields=name,status,update` + When I run `wp theme list --fields=name,update` Then STDOUT should be a table containing rows: - | name | status | update | - | twentytwentyfour | active | available | + | name | update | + | twentytwelve | available | # Repeating the same command again should produce the same results - When I run `wp theme list --fields=name,status,update` + When I run the previous command again Then STDOUT should be a table containing rows: - | name | status | update | - | twentytwentyfour | active | available | + | name | update | + | twentytwelve | available | # Using the --force-check flag should refresh the transient back to the original value - When I run `wp theme list --fields=name,status,update --force-check` + When I run `wp theme list --fields=name,update --force-check` Then STDOUT should be a table containing rows: - | name | status | update | - | twentytwentyfour | active | none | + | name | update | + | twentytwelve | none | When I try `wp theme list --skip-update-check --force-check` Then STDERR should contain: diff --git a/src/Plugin_Command.php b/src/Plugin_Command.php index 17c0c36b..a6d1ba32 100644 --- a/src/Plugin_Command.php +++ b/src/Plugin_Command.php @@ -1327,7 +1327,7 @@ public function delete( $args, $assoc_args = array() ) { * * [--force-check] * : Bypass the transient cache and force a fresh update check. - * + * * [--recently-active] * : If set, only recently active plugins will be shown and the status filter will be ignored. * diff --git a/src/WP_CLI/CommandWithUpgrade.php b/src/WP_CLI/CommandWithUpgrade.php index 50a3dc63..708ad9d8 100755 --- a/src/WP_CLI/CommandWithUpgrade.php +++ b/src/WP_CLI/CommandWithUpgrade.php @@ -533,8 +533,8 @@ static function ( $result ) { protected function _list( $_, $assoc_args ) { // If `--force-check` and `--skip-update-check` flags are both present, abort. - if ( true === (bool) Utils\get_flag_value( $assoc_args, 'force-check', false ) and true === (bool) Utils\get_flag_value( $assoc_args, 'skip-update-check', false ) ) { - WP_CLI::error("{$this->item_type} updates cannot be both force-checked and skipped. Choose one."); + if ( true === (bool) Utils\get_flag_value( $assoc_args, 'force-check', false ) && true === (bool) Utils\get_flag_value( $assoc_args, 'skip-update-check', false ) ) { + WP_CLI::error( "{$this->item_type} updates cannot be both force-checked and skipped. Choose one." ); } // If `--force-check` flag is present, delete the upgrade transient. From 9091c322810cab7b32c9bf7e81df906df7f742b5 Mon Sep 17 00:00:00 2001 From: Saul Baizman Date: Tue, 14 May 2024 10:39:17 -0400 Subject: [PATCH 8/9] Update the plugin-list.feature to more closely copy theme-list.feature. --- features/plugin-list.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/plugin-list.feature b/features/plugin-list.feature index 176eb702..54206f8b 100644 --- a/features/plugin-list.feature +++ b/features/plugin-list.feature @@ -44,7 +44,7 @@ Feature: List WordPress plugins | hello-dolly | inactive | available | # Repeating the same command again should produce the same results - When I run `wp plugin list --fields=name,status,update` + When I run the previous command again Then STDOUT should be a table containing rows: | name | status | update | | hello-dolly | inactive | available | From 9c858402b3d3323befc7933b9d562ec8efd90792 Mon Sep 17 00:00:00 2001 From: Saul Baizman Date: Tue, 14 May 2024 10:39:43 -0400 Subject: [PATCH 9/9] Add uppercase first word warning. --- features/plugin-list.feature | 2 +- features/theme-list.feature | 2 +- src/WP_CLI/CommandWithUpgrade.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/features/plugin-list.feature b/features/plugin-list.feature index 54206f8b..d8a680db 100644 --- a/features/plugin-list.feature +++ b/features/plugin-list.feature @@ -58,7 +58,7 @@ Feature: List WordPress plugins When I try `wp plugin list --skip-update-check --force-check` Then STDERR should contain: """ - Error: plugin updates cannot be both force-checked and skipped. Choose one. + Error: Plugin updates cannot be both force-checked and skipped. Choose one. """ And STDOUT should be empty And the return code should be 1 diff --git a/features/theme-list.feature b/features/theme-list.feature index eab6a82d..b9aec2f6 100644 --- a/features/theme-list.feature +++ b/features/theme-list.feature @@ -56,7 +56,7 @@ Feature: List WordPress themes When I try `wp theme list --skip-update-check --force-check` Then STDERR should contain: """ - Error: theme updates cannot be both force-checked and skipped. Choose one. + Error: Theme updates cannot be both force-checked and skipped. Choose one. """ And STDOUT should be empty And the return code should be 1 diff --git a/src/WP_CLI/CommandWithUpgrade.php b/src/WP_CLI/CommandWithUpgrade.php index 708ad9d8..4642704e 100755 --- a/src/WP_CLI/CommandWithUpgrade.php +++ b/src/WP_CLI/CommandWithUpgrade.php @@ -534,7 +534,7 @@ protected function _list( $_, $assoc_args ) { // If `--force-check` and `--skip-update-check` flags are both present, abort. if ( true === (bool) Utils\get_flag_value( $assoc_args, 'force-check', false ) && true === (bool) Utils\get_flag_value( $assoc_args, 'skip-update-check', false ) ) { - WP_CLI::error( "{$this->item_type} updates cannot be both force-checked and skipped. Choose one." ); + WP_CLI::error( ucfirst( "{$this->item_type} updates cannot be both force-checked and skipped. Choose one." ) ); } // If `--force-check` flag is present, delete the upgrade transient.