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

Suggest brew update && … when handling errors or missing methods #8072

Merged
merged 1 commit into from
Dec 12, 2014
Merged

Suggest brew update && … when handling errors or missing methods #8072

merged 1 commit into from
Dec 12, 2014

Conversation

claui
Copy link
Contributor

@claui claui commented Dec 12, 2014

As @ndr-qef and @rolandwalker suggested on IRC.

This is supposed to help cut trivial issues that would be easily fixable by doing brew update && … etc.
Also, splitting unit tests in two to keep one from triggering the other.

This helps cut trivial issues that would be easily fixable by doing `brew update && …`.
@claui
Copy link
Contributor Author

claui commented Dec 12, 2014

Generic error

Warning: missing method

@claui claui added the core Issue with Homebrew itself rather than with a specific cask. label Dec 12, 2014
def self.error_message_with_suggestions
<<-EOS.undent
#{ Tty.reset }
#{ Tty.white }Most likely, this means you have #{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my only question is what this empty #{} does

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ve been taught that lines longer than 80 chars are bad.
Sometimes this makes me feel so guilty that I even try to follow this rule in herestrings. 😊

Am I free to ignore this rule in herestrings? Or maybe you happen to know a less confusing way to soft-wrap long lines?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then it is a clever trick.

You are free to do as you please, in heredocs and elsewhere. We can adopt a style re: wrapping across the codebase if it benefits you. I tend to let code run wide, which attracts criticism.

rolandwalker added a commit that referenced this pull request Dec 12, 2014
Suggest `brew update && …` when handling errors or missing methods
@rolandwalker rolandwalker merged commit 488df3b into Homebrew:master Dec 12, 2014
@claui
Copy link
Contributor Author

claui commented Dec 12, 2014

Thanks for reviewing and for the comments!

Oh, I’m fine with the codebase as it stands. Should we ever commit to any stylistic rules (as the number of backend devs – hopefully – grows with the project), I’ll be happy to adhere to them!

@claui claui deleted the on-error-suggest-update branch December 12, 2014 22:16
@vitorgalvao
Copy link
Contributor

Great news to have this implemented. This also likely means I’ll be able to retire one of my TextExpander snippets.

However, is

still the final message?

“Oh no, I accidentally the whole Caskroom” makes no sense.

@tapeinosyne
Copy link
Contributor

It is merely a placeholder used in the screenshot.

@vitorgalvao
Copy link
Contributor

Ah, good. I couldn’t find it in the PR itself, so I was wondering if it was there from before.

@claui
Copy link
Contributor Author

claui commented Dec 13, 2014

@ndr-qef You’re correct, thanks for clarifying 😊

@vitorgalvao I temporarily placed a fail command in Cask::CLI::List::run which was the only way to provoke an error I could come up with on the spot. I faintly remember that I have come across an internal CLI command at some point in the past that was specifically drafted for this. I looked for it yesterday, but I’ve got no idea where it is 🙈

@miccal miccal removed the core Issue with Homebrew itself rather than with a specific cask. label Dec 23, 2016
@Homebrew Homebrew locked and limited conversation to collaborators May 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants