Skip to content

Conversation

@Nikschavan
Copy link
Contributor

By default WP-CLI does a force update check when running 'wp plugin list' and 'wp theme list'
'--skip-update-check' flag can be added to these commands which can bypass the force udpate check

Fixes #299

@Nikschavan
Copy link
Contributor Author

@schlessera The tests are failing on PHP 5.6 because of null coalescing operator in the one-time-login plugin which is being downloaded in one of the tests.

Is there anything that should be done to fix this? maybe changing the tests to download another dummy repo with a simple plugin. This failing test seems to checking that the branch name is removed from the project downloaded from GitHub (in a separate PR).

Also, I am not sure if I can add any new tests for this new flag introduced int this PR, since the stdout will be same?
I am new to behat testing.

@Nikschavan Nikschavan marked this pull request as ready for review October 8, 2021 16:09
@Nikschavan Nikschavan requested a review from a team as a code owner October 8, 2021 16:09
@swissspidy
Copy link
Member

One Time Login apparently requires PHP 7.1 nowadays. So yeah we should download a different one.

@schlessera schlessera changed the title Add '--skip-update-check' flag to plugin and theme list command Add --skip-update-check flag to plugin list and theme list commands Oct 9, 2021
Copy link
Member

@schlessera schlessera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also needs a Behat test to ensure the flag works (and keeps working across future updates).

@Nikschavan
Copy link
Contributor Author

Converting the PR to draft until i debug the failing tests.

@Nikschavan Nikschavan marked this pull request as ready for review October 12, 2021 03:31
@Nikschavan
Copy link
Contributor Author

This is now ready for a review. The failing PHP 5.6 tests should be fixed with #302

@Nikschavan Nikschavan requested a review from schlessera October 12, 2021 06:34
@schlessera schlessera force-pushed the 299-skip-update-check branch from c0f4709 to bbaf0fa Compare October 13, 2021 05:26
@schlessera schlessera merged commit d54dec2 into wp-cli:master Oct 13, 2021
@schlessera
Copy link
Member

Thanks for the PR, @Nikschavan !

@schlessera schlessera added this to the 2.1.3 milestone Oct 13, 2021
@Nikschavan Nikschavan deleted the 299-skip-update-check branch October 13, 2021 17:15
@Nikschavan
Copy link
Contributor Author

@schlessera - Is there any (rough) timeline when this can be available in the nightly/stable of wp-cli, I believe until a release is created on an individual command, it is not available in the nightly of wp-cli as well, correct?

I also created wp-cli/wp-cli-bundle#354 to discuss if there is a way to make nightlies include nightly code changes of individual commands as well.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a flag in plugin list and theme list commands to skip force update-check

3 participants