diff options
| author | Max Howell | 2010-01-06 23:38:07 +0000 |
|---|---|---|
| committer | Max Howell | 2010-01-06 23:38:07 +0000 |
| commit | 56351558b8210d2ee9cfabf939db61dfeb9438af (patch) | |
| tree | ab48ad9aee0563d2d2e1b431aa1b61eacc0af95b /bin | |
| parent | 89479912ecbfe343a7d002c9b71d2359cc1cbde2 (diff) | |
| download | brew-56351558b8210d2ee9cfabf939db61dfeb9438af.tar.bz2 | |
Check GitHub for issues relating to build failures
Uses the GitHub issue search API, so it's very neat and concise. However you can get false positives, so it's not 100% useful. Still I think it is more useful than before, which was, nothing.
A further issue is it depends on the ticket at GitHub using the formula's proper name. So we should ensure this as we can.
Finally, it does add a possibly large delay to clean exit after a build error. We may want to fiddle with timeouts if it becomes troublesome.
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/brew | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -326,12 +326,18 @@ rescue Interrupt => e exit 130 rescue BuildError => e e.backtrace[1] =~ %r{Library/Formula/(.+)\.rb:(\d+)} - puts "http://github.com/mxcl/homebrew/blob/master/Library/Formula/#{$1}.rb#L#{$2}" + formula_name = $1 + puts "http://github.com/mxcl/homebrew/blob/master/Library/Formula/#{formula_name}.rb#L#{$2}" ohai "Environment" dump_config puts "Exit status: #{e.status.exitstatus}" onoe e puts PLEASE_REPORT_BUG + # this feature can be slow (depends on network conditions and if github is up) + # so ideally we'd show feedback, eg. "checking for existin issues..." and + # then replace that string with the following when the github api returns + issues = issues_for_formula(formula_name) + puts "These existing issues may help you:", *issues unless issues.empty? exit 1 rescue RuntimeError, SystemCallError => e onoe e |
