From 9c858402b3d3323befc7933b9d562ec8efd90792 Mon Sep 17 00:00:00 2001 From: Saul Baizman Date: Tue, 14 May 2024 10:39:43 -0400 Subject: [PATCH] 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.