Skip to content

wp plugin update --all reports false positive update "status" when local version is higher than repo #187

@mrwweb

Description

@mrwweb

Bug Report

Describe the current, buggy behavior
Definitely Related: #142
Maybe Related: #175

It's not all that uncommon to run a version of a plugin (or theme) that is higher than the version in the repository. In my case, I'm running one more-recent version of a plugin from Github that hasn't been released in the repo and a personal copy of a plugin with numerous bug fixes that I haven't been able to get merged.

$ wp plugin update --all
The plugin is at the latest version.
The plugin is at the latest version.
+---------------------+-------------+-------------+---------+
| name                | old_version | new_version | status  |
+---------------------+-------------+-------------+---------+
| content-audit-FIXES | 2.0a        |             | Updated |
| wp-help-master      | 1.6.0-beta1 |             | Updated |
+---------------------+-------------+-------------+---------+
Success: Updated 2 of 2 plugins.

Describe how other contributors can replicate this bug

  1. Bump the Version number of any plugin in the repo so it's higher than the latest version
  2. $ wp plugin update --all
  3. result name shows "Updated"

Describe what you would expect as the correct outcome

WP-CLI should report that the plugin version is higher than expected and no action was taken.

Let us know what environment you are running this on

OS:     Linux 4.9.93-boot2docker #1 SMP Thu Jul 19 18:29:50 UTC 2018 x86_64
Shell:
PHP binary:     /opt/php/7.2.0/bin/php
PHP version:    7.2.0
php.ini used:   /conf/php/7.2.0/php.ini
WP-CLI root dir:        phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir:      phar://wp-cli.phar/vendor
WP_CLI phar path:       /
WP-CLI packages dir:
WP-CLI global config:
WP-CLI project config:  //wp-cli.yml
WP-CLI version: 2.2.0

Provide a possible solution

Using example from the above and taking inspiration from $ wp plugin list:

$ wp plugin update --all
Warning: Version higher than expected.
Warning: Version higher than expected.
Error: No plugins updated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions