Skip to content

Commit 27ab4e6

Browse files
swissspidyCopilot
andauthored
Update src/Plugin_Command.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 5ad764d commit 27ab4e6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/Plugin_Command.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,10 @@ public function update( $args, $assoc_args ) {
768768
WP_CLI::error( 'Cannot use --version with --auto-update-indicated. The version is determined by the server.' );
769769
}
770770

771+
// Don't allow --minor or --patch to be set with --auto-update-indicated, as the version comes from the server.
772+
if ( $auto_update_indicated && ( isset( $assoc_args['minor'] ) || isset( $assoc_args['patch'] ) ) ) {
773+
WP_CLI::error( 'Cannot use --minor or --patch with --auto-update-indicated. The version is determined by the server.' );
774+
}
771775
// If --auto-update-indicated is set, we need to filter plugins by this flag.
772776
if ( $auto_update_indicated ) {
773777
// Get all plugins with their update info.

0 commit comments

Comments
 (0)