-
-
Notifications
You must be signed in to change notification settings - Fork 11.4k
Feature request: Make brew upgrade return a non-error when on latest version #27048
Comments
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. |
An audit of all messages and return codes would need some kind of guideline for them and some way of testing them |
@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. |
We can't change this. It was done deliberately in e1c62c3. |
@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. |
Apologies, I misunderstood the request. |
Though I am still concerned about changing the exit code; there are definitely scripts in the wild that depend on the current behavior. |
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 |
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. |
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" |
@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. |
Currently if I run
brew upgrade rbenv
I get the outputError: 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
The text was updated successfully, but these errors were encountered: