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

Nag user when there's an update to WP-CLI available #2538

Merged
merged 2 commits into from Mar 9, 2016

Conversation

@danielbachhuber
Copy link
Member

commented Mar 7, 2016

Auto check update only happens when a user is driving WP-CLI, not a
script. WP_CLI_AUTO_CHECK_UPDATE_DAYS environment variable can be used
to change the number of days between checks (defaults to 1).
WP_CLI_DISABLE_AUTO_CHECK_UPDATE can be used to disable the update
check entirely.

Fixes #1011

Nag user when there's an update to WP-CLI available
Auto check update only happens when a user is driving WP-CLI, not a
script. `WP_CLI_AUTO_CHECK_UPDATE_DAYS` environment variable can be used
to change the number of days between checks (defaults to 1).
`WP_CLI_DISABLE_AUTO_CHECK_UPDATE` can be used to disable the update
check entirely.

@danielbachhuber danielbachhuber added this to the 0.23.0 milestone Mar 7, 2016

@danielbachhuber danielbachhuber referenced this pull request Mar 7, 2016
@danielbachhuber

This comment has been minimized.

Copy link
Member Author

commented Mar 7, 2016

@wp-cli/committers I'd love a second pair of eyes on this if someone has a moment — and suggestions on how we can add test coverage around it.

@borekb

This comment has been minimized.

Copy link
Contributor

commented Mar 8, 2016

Looks good to me – anything in particular you'd like to get feedback on?

Regarding tests, I'm not sure how you're gonna test this – it's full of side effects by definition. How do Composer guys test composer self-update?

@danielbachhuber

This comment has been minimized.

Copy link
Member Author

commented Mar 8, 2016

Looks good to me – anything in particular you'd like to get feedback on?

More of a sanity check than anything else. I'm trying to be deliberately conservative such that, even if there are bugs, it impacts a small number of users.

Regarding tests, I'm not sure how you're gonna test this – it's full of side effects by definition. How do Composer guys test composer self-update?

Yeah, pretty much. I'll take a look at Composer.

danielbachhuber added a commit that referenced this pull request Mar 9, 2016
Merge pull request #2538 from wp-cli/1011-update-notif
Nag user when there's an update to WP-CLI available

@danielbachhuber danielbachhuber merged commit 1e813ee into master Mar 9, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@danielbachhuber danielbachhuber deleted the 1011-update-notif branch Mar 9, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.