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

upgrade: skip formula if upgrade fails due to unsatisfied requirement. #3644

Merged
merged 1 commit into from Jan 8, 2018

Conversation

Projects
None yet
5 participants
@MikeMcQuaid
Member

MikeMcQuaid commented Jan 8, 2018

Rather than blocking the rest of the formulae from being installed by brew upgrade print the requirement failure messages (already done) and an error stating requirements weren't satisfied and then continue to upgrade the rest of the formulae.

upgrade: skip formula if upgrade fails.
Rather than blocking the rest of the formulae from being installed by
`brew upgrade` print the requirement failure messages (already done) and
an error stating requirements weren't satisfied and then continue to
upgrade the rest of the formulae.

@MikeMcQuaid MikeMcQuaid changed the title upgrade: skip formula if upgrade fails. upgrade: skip formula if upgrade fails due to unsatisfied requirement. Jan 8, 2018

@ilovezfs ilovezfs merged commit 987805d into Homebrew:master Jan 8, 2018

2 of 3 checks passed

codecov/patch 50% of diff hit (target 70.35%)
Details
codecov/project 70.36% (+0.01%) compared to 13998f5
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@ilovezfs ilovezfs referenced this pull request Jan 8, 2018

Closed

zsh: make gdbm and pcre optional instead of required #22535

4 of 4 tasks complete

@MikeMcQuaid MikeMcQuaid deleted the MikeMcQuaid:upgrade-skip-failed-reqs branch Jan 8, 2018

@zmwangx

This comment has been minimized.

Contributor

zmwangx commented Jan 8, 2018

Slight nitpick here: the exit status is zero despite the error.

@MikeMcQuaid

This comment has been minimized.

Member

MikeMcQuaid commented Jan 9, 2018

@zmwangx Oops, thanks, fixed in 9ed1ed3.

@ylluminarious

This comment has been minimized.

ylluminarious commented Jan 30, 2018

This is a great improvement on the original behavior, although IMO it is also desirable that the exit status is non-erring. That way a one-liner such as brew upgrade && brew cleanup will not fail halfway through.

@alyssais

This comment has been minimized.

Contributor

alyssais commented Jan 30, 2018

@ylluminarious the error status in this case will continue to report an error, because an error occurred and the command was not able to successfully complete its task. If you want to cleanup even if an error occurred while upgrading, you can just do brew upgrade; brew cleanup.

@Homebrew Homebrew locked and limited conversation to collaborators May 4, 2018

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