Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Feature request: Make brew upgrade return a non-error when on latest version #27048

Closed
deiga opened this issue Feb 27, 2014 · 11 comments
Closed

Comments

@deiga
Copy link
Contributor

deiga commented Feb 27, 2014

Currently if I run brew upgrade rbenv I get the output Error: rbenv-0.4.0 already installed, which is fairly accurate, but I wouldn't consider that an error. Isn't it a good thing that we're on the latest version? This way scripts can't understand if we had an error while installing or if were just up-to date.

Suggestion: Make it an INFO level messages that we're up-to date and don't return a non-zero value

@adamv
Copy link
Contributor

adamv commented Feb 27, 2014

I would support an audit of all Homebrew messages and return codes.

Though some of them have history behind them and may be breaking changes if changed.

@deiga
Copy link
Contributor Author

deiga commented Feb 27, 2014

An audit of all messages and return codes would need some kind of guideline for them and some way of testing them

@MikeMcQuaid
Copy link
Member

@adamv I think we should be careful about changing return codes given we say the CLI is our interface. I'm in favour of having a new test suite which runs a bunch of commands and tests their exit code.

@jacknagel
Copy link
Contributor

We can't change this. It was done deliberately in e1c62c3.

@deiga
Copy link
Contributor Author

deiga commented Feb 28, 2014

@jacknagel My change doesn't even touch the concern which was fixed in that commit. Especially since it's not an error that a package is up-to date.

@jacknagel
Copy link
Contributor

Apologies, I misunderstood the request.

@jacknagel jacknagel reopened this Feb 28, 2014
@jacknagel
Copy link
Contributor

Though I am still concerned about changing the exit code; there are definitely scripts in the wild that depend on the current behavior.

@deiga
Copy link
Contributor Author

deiga commented Feb 28, 2014

Of course there are, but I'm suggesting that the current behaviour is dead wrong in sense of context and any dependents should actually fail if this change gets implemented

@jacknagel
Copy link
Contributor

The consensus among maintainers in this thread is to avoid changing exit codes and breaking the existing interface, so I'm closing this issue and the associated pull request.

@deiga
Copy link
Contributor Author

deiga commented Mar 20, 2014

I think this is not a good decision as the current behaviour does not adhere to standard *NIX return codes and it actually makes implementing CLI scripts with brew more difficult, since a user never knows if he got an actual error or an "success error"

@MikeMcQuaid
Copy link
Member

@deiga Sorry but we're too widely used to make changes like this. I'm sorry it's harder to create your own scripts but that's better than breaking existing scripts.

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

Successfully merging a pull request may close this issue.

4 participants