-
-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Call upgrade if something was passed to update #2858
Conversation
|
@reitermarkus: when you are aware of difference between I use npm more often, where |
Thanks for the PR! I appreciate this explanation and if others feel the same way: please chime in on this PR but I'd like to hear from a lot more people before we add this. |
While it might be convenient to be able to use |
Agreed. It seems like someone would get used to Now that I think about it, since |
Maybe then not call brew upgrade immediately, but instead print But I do not see a problem that people would rely on this behaviour constantly and would be surprised when they'd try |
This is something we'd merge if you change it to output the full arguments for |
@MikeMcQuaid: I've updated pull request to only display message without running |
Library/Homebrew/cmd/update.sh
Outdated
@@ -336,7 +336,8 @@ homebrew-update() { | |||
*) | |||
odie <<EOS | |||
This command updates brew itself, and does not take formula names. | |||
Use 'brew upgrade <formula>'. | |||
Use 'brew upgrade <formula>' instead. | |||
You probably want 'brew upgrade $@'... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use 'brew upgrade $@' instead.
I think is sufficient and more concise, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MikeMcQuaid: done
Rebased on current master. Summary: after applying this change |
So the user could just copy-paste the command.
Thanks for your first contribution to Homebrew, @marinintim! Without people like you submitting PRs we couldn't run this project. You rock! |
brew tests
with your changes locally?This pull request calls
brew upgrade <formula>
if was mistakenly called asbrew update <formula>
. If there is an obvious and single solution to user's mistake, why wouldn't homebrew fix it itself?I didn't add any tests, because I'm not sure how to test this change.