Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 of 2 tasks
mrwweb opened this issue Jul 4, 2019 · 3 comments · Fixed by #191
Closed
1 of 2 tasks

Comments

@mrwweb
Copy link

mrwweb commented Jul 4, 2019

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.
@schlessera
Copy link
Member

Yes, this is a bug indeed. I assume the status check just acts on the two versions being "different", without qualifying further.

@jasomdotnet
Copy link

jasomdotnet commented Sep 1, 2020

Again an issue in August 2020.

In August I updated to wp-cli 2.4.0 and issue described here appeared. When I rolled back to 2.3.0 problem with wp plugin update --all freezing is gone.

@montaniasystemab
Copy link

I can confirm this is an issue with themes as well, wp-cli 2.4.0 up to date:

$ wp theme list
+----------------+----------+------------------------------+---------+
| name           | status   | update                       | version |
+----------------+----------+------------------------------+---------+
| flatsome-old   | inactive | version higher than expected | 3.9.0   |
| flatsome       | active   | version higher than expected | 3.11.1  |
| twentynineteen | inactive | version higher than expected | 1.4     |
| twentytwenty   | inactive | version higher than expected | 1.1     |
+----------------+----------+------------------------------+---------+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants