Skip to content
Newer
Older
100755 318 lines (273 sloc) 9.03 KB
84c5c3e @mxcl The core tree, and some formulae
mxcl authored May 21, 2009
1 #!/usr/bin/ruby
b539e96 @bmaland Sort the output from `brew install`
bmaland authored Sep 3, 2009
2 # -*- coding: utf-8 -*-
725a699 @imbriaco Fix brew if it's symlinked from elsewhere
imbriaco authored Oct 2, 2009
3
7be9788 @mxcl Don't look broken if CWD doesn't exist
mxcl authored Oct 23, 2009
4 # Many Pathname operations use getwd when they shouldn't, and then throw
5 # odd exceptions. Reduce our support burden by showing a user-friendly error.
6 Dir.getwd rescue abort "The current working directory doesn't exist, cannot proceed."
7
d81a8e6 @mxcl Simplify the library path determination code a little
mxcl authored Nov 7, 2009
8 HOMEBREW_BREW_FILE = ENV['HOMEBREW_BREW_FILE'] = File.expand_path(__FILE__)
ce01313 @adamv Rewrite of HOMEBREW_ folder locations
adamv authored Oct 5, 2009
9
d81a8e6 @mxcl Simplify the library path determination code a little
mxcl authored Nov 7, 2009
10 require 'pathname'
11 $:.unshift((Pathname.new(__FILE__).realpath.dirname.parent+"Library"+"Homebrew").to_s)
2b22c47 @mxcl Allow formulae to use __END__
mxcl authored Sep 4, 2009
12 require 'global'
6b6d369 @mxcl Refactor
mxcl authored Aug 10, 2009
13
629c4e3 @mxcl Handle certain ARGV parameters before certain error checks
mxcl authored Oct 15, 2009
14 case ARGV.first
15 when '--cache'
16 puts HOMEBREW_CACHE
17 exit 0
246f44d @adamv Also allow 'brew help'.
adamv authored Nov 16, 2009
18 when '-h', '--help', '--usage', '-?', 'help', nil
629c4e3 @mxcl Handle certain ARGV parameters before certain error checks
mxcl authored Oct 15, 2009
19 puts ARGV.usage
20 exit 0
21 when '--version'
22 puts HOMEBREW_VERSION
23 exit 0
24 when '-v'
25 if ARGV.length > 1
26 puts "Homebrew #{HOMEBREW_VERSION}"
27 # continue in verbose mode
28 ARGV << ARGV.shift
29 else
30 puts HOMEBREW_VERSION
31 exit 0
32 end
33 end
34
35 case HOMEBREW_PREFIX.to_s when '/', '/usr'
36 # it may work, but I only see pain this route and don't want to support it
37 abort "Cowardly refusing to continue at this prefix: #{HOMEBREW_PREFIX}"
d614113 @mxcl Refactor Formulae
mxcl authored Jun 2, 2009
38 end
deeb33a @mxcl Use MACOS_VERSION in bin/brew
mxcl authored Sep 25, 2009
39 if MACOS_VERSION < 10.5
725a699 @imbriaco Fix brew if it's symlinked from elsewhere
imbriaco authored Oct 2, 2009
40 abort "Homebrew requires Leopard or higher, but you could fork it and fix that..."
ed1fed4 @mxcl Error out if the host OS X is too old
mxcl authored Aug 12, 2009
41 end
68108e1 @mxcl Dependency resolution with fancy syntax
mxcl authored Sep 18, 2009
42
ce01313 @adamv Rewrite of HOMEBREW_ folder locations
adamv authored Oct 5, 2009
43 def dump_config
de1ebbe @adamv Add OS X, Ruby, compiler & hardware info to --config
adamv authored Nov 8, 2009
44 require 'hardware'
ef39ada @adamv Move some helper functions into Hardware
adamv authored Nov 16, 2009
45 bits = Hardware.bits
46 cores = Hardware.cores_as_words
709dcb9 @mxcl My idea of tidy, sorry Adam…
mxcl authored Nov 9, 2009
47 llvm = llvm_build
0c550e1 @mxcl Include HEAD SHA with brew --config
mxcl authored Nov 11, 2009
48 sha = `git rev-parse --verify HEAD`.chomp
c078840 @mxcl Show kernel architecture in brew --config output
mxcl authored Nov 11, 2009
49 kernel_arch = `uname -m`.chomp
ce01313 @adamv Rewrite of HOMEBREW_ folder locations
adamv authored Oct 5, 2009
50
de1ebbe @adamv Add OS X, Ruby, compiler & hardware info to --config
adamv authored Nov 8, 2009
51 puts <<-EOS
52 HOMEBREW_VERSION: #{HOMEBREW_VERSION}
0c550e1 @mxcl Include HEAD SHA with brew --config
mxcl authored Nov 11, 2009
53 HEAD: #{sha}
709dcb9 @mxcl My idea of tidy, sorry Adam…
mxcl authored Nov 9, 2009
54 HOMEBREW_PREFIX: #{HOMEBREW_PREFIX}
55 HOMEBREW_CELLAR: #{HOMEBREW_CELLAR}
56 HOMEBREW_CACHE: #{HOMEBREW_CACHE}
ce01313 @adamv Rewrite of HOMEBREW_ folder locations
adamv authored Oct 5, 2009
57 HOMEBREW_REPOSITORY: #{HOMEBREW_REPOSITORY}
c078840 @mxcl Show kernel architecture in brew --config output
mxcl authored Nov 11, 2009
58 Library Path: #{$:.first}
709dcb9 @mxcl My idea of tidy, sorry Adam…
mxcl authored Nov 9, 2009
59 Hardware: #{cores}-core #{bits}-bit #{Hardware.intel_family}
de1ebbe @adamv Add OS X, Ruby, compiler & hardware info to --config
adamv authored Nov 8, 2009
60 OS X: #{MACOS_FULL_VERSION}
c078840 @mxcl Show kernel architecture in brew --config output
mxcl authored Nov 11, 2009
61 Kernel Architecture: #{kernel_arch}
de1ebbe @adamv Add OS X, Ruby, compiler & hardware info to --config
adamv authored Nov 8, 2009
62 Ruby: #{RUBY_VERSION}-#{RUBY_PATCHLEVEL}
a905313 @mxcl Include macports or fink info with brew --config
mxcl authored Nov 11, 2009
63 GCC: 4.2 build #{gcc_build}
709dcb9 @mxcl My idea of tidy, sorry Adam…
mxcl authored Nov 9, 2009
64 LLVM: #{llvm ? "build #{llvm}" : "N/A" }
a905313 @mxcl Include macports or fink info with brew --config
mxcl authored Nov 11, 2009
65 MacPorts or Fink? #{macports_or_fink_installed?}
ce01313 @adamv Rewrite of HOMEBREW_ folder locations
adamv authored Oct 5, 2009
66 EOS
67 end
68
d614113 @mxcl Refactor Formulae
mxcl authored Jun 2, 2009
69 begin
629c4e3 @mxcl Handle certain ARGV parameters before certain error checks
mxcl authored Oct 15, 2009
70 require 'brew.h'
71
72edfbf @mxcl brew install improvements
mxcl authored Oct 26, 2009
72 case arg = ARGV.shift
629c4e3 @mxcl Handle certain ARGV parameters before certain error checks
mxcl authored Oct 15, 2009
73 when '--prefix'
74 puts HOMEBREW_PREFIX
ce01313 @adamv Rewrite of HOMEBREW_ folder locations
adamv authored Oct 5, 2009
75 when '--config'
76 dump_config
3cf1226 @mxcl Refactor--object orientate where sensible
mxcl authored Jul 24, 2009
77
df793f7 @adamv brew home foo open's foo's homepage in default web-browser
adamv authored Jul 31, 2009
78 when 'home', 'homepage'
39b392d @mxcl Don't throw if named.empty?
mxcl authored Oct 26, 2009
79 if ARGV.named.empty?
6b6d369 @mxcl Refactor
mxcl authored Aug 10, 2009
80 exec "open", HOMEBREW_WWW
81 else
82 exec "open", *ARGV.formulae.collect {|f| f.homepage}
83 end
df793f7 @adamv brew home foo open's foo's homepage in default web-browser
adamv authored Aug 1, 2009
84
3cf1226 @mxcl Refactor--object orientate where sensible
mxcl authored Jul 24, 2009
85 when 'ls', 'list'
61b3aea brew list --unbrewed
Kieran Pilkington authored Sep 25, 2009
86 if ARGV.flag? '--unbrewed'
a18bc0f @mxcl brew list --unbrewed fix
mxcl authored Sep 29, 2009
87 dirs = HOMEBREW_PREFIX.children.select { |pn| pn.directory? }.collect { |pn| pn.basename.to_s }
88 dirs -= ['Library', 'Cellar', '.git']
89 Dir.chdir HOMEBREW_PREFIX
90 exec 'find', *dirs + %w[-type f ( ! -iname .ds_store ! -iname brew )]
39b392d @mxcl Don't throw if named.empty?
mxcl authored Oct 26, 2009
91 elsif ARGV.named.empty?
e3cd5d6 @mxcl brew ls with no further ARGV lists all installed kegs
mxcl authored Aug 23, 2009
92 ENV['CLICOLOR']=nil
87d770d @mxcl Fixes #78
mxcl authored Oct 4, 2009
93 exec 'ls', *ARGV.options<<HOMEBREW_CELLAR if HOMEBREW_CELLAR.exist?
36aacf7 @mxcl Don't summarize brew list if piped to another command
mxcl authored Sep 25, 2009
94 elsif ARGV.verbose? or not $stdout.tty?
e3cd5d6 @mxcl brew ls with no further ARGV lists all installed kegs
mxcl authored Aug 23, 2009
95 exec "find", *ARGV.kegs+%w[-not -type d -print]
e698609 @mxcl Summarised listings with brew list
mxcl authored Sep 24, 2009
96 else
97 ARGV.kegs.each { |keg| PrettyListing.new keg }
e3cd5d6 @mxcl brew ls with no further ARGV lists all installed kegs
mxcl authored Aug 23, 2009
98 end
3cf1226 @mxcl Refactor--object orientate where sensible
mxcl authored Jul 24, 2009
99
c853b5f @indirect `brew search' command
indirect authored Sep 4, 2009
100 when 'search', '-S'
84024e6 @adamv Add alias support to formulae
adamv authored Nov 16, 2009
101 require "formula"
102 formulae = Formulary.names with_aliases=true
103
d8ad9ac @indirect Search by substring unless term is inside /../
indirect authored Sep 17, 2009
104 if ARGV.first =~ /^\/(.*)\/$/
105 puts_columns formulae.grep(Regexp.new($1))
106 else
107 puts_columns formulae.grep(/.*#{ARGV.first}.*/)
108 end
c853b5f @indirect `brew search' command
indirect authored Sep 4, 2009
109
7dfe55d @mxcl brew edit and brew macports commmands
mxcl authored Jun 26, 2009
110 when 'edit'
39b392d @mxcl Don't throw if named.empty?
mxcl authored Oct 26, 2009
111 if ARGV.named.empty?
e23a612 @scoates Use ENV[EDITOR] if possible
scoates authored Sep 5, 2009
112 # EDITOR isn't a good fit here, we need a GUI client that actually has
113 # a UI for projects, so apologies if this wasn't what you expected,
114 # please improve it! :)
ce01313 @adamv Rewrite of HOMEBREW_ folder locations
adamv authored Oct 5, 2009
115 exec 'mate', *Dir["#{HOMEBREW_REPOSITORY}/Library/*"]<<
116 "#{HOMEBREW_REPOSITORY}/bin/brew"<<
117 "#{HOMEBREW_REPOSITORY}/README.md"
8f3ff69 @adamv Fix when 'edit' if/else indentation
adamv authored Nov 16, 2009
118 else
119 # we don't use ARGV.formulae as that will throw if the file doesn't parse
120 paths = ARGV.named.collect do |name|
121 unless File.exist? path = "#{HOMEBREW_REPOSITORY}/Library/Formula/#{name}.rb"
122 require 'formula'
123 raise FormulaUnavailableError, name
124 else
125 path
126 end
8e676a3 @mxcl brew edit works if the file in question won't parse
mxcl authored Nov 5, 2009
127 end
8f3ff69 @adamv Fix when 'edit' if/else indentation
adamv authored Nov 16, 2009
128 exec_editor *paths
7dfe55d @mxcl brew edit and brew macports commmands
mxcl authored Jun 26, 2009
129 end
130
871b25c @alloy Update Homebrew and list the updated formulae.
alloy authored Sep 8, 2009
131 when 'up', 'update'
460ecea @mxcl Rename refresh_brew.rb to update.rb
mxcl authored Sep 17, 2009
132 require 'update'
871b25c @alloy Update Homebrew and list the updated formulae.
alloy authored Sep 7, 2009
133 updater = RefreshBrew.new
5092d7b @alloy Made the output of updating a bit nicer and log more if --verbose.
alloy authored Sep 11, 2009
134 old_revision = updater.current_revision
871b25c @alloy Update Homebrew and list the updated formulae.
alloy authored Sep 7, 2009
135 unless updater.update_from_masterbrew!
35b0b61 @mxcl Remove some ohai() use
mxcl authored Sep 21, 2009
136 puts "Already up-to-date."
871b25c @alloy Update Homebrew and list the updated formulae.
alloy authored Sep 7, 2009
137 else
0c48248 @alloy Only show the first 8 characters of the commit hashes.
alloy authored Sep 20, 2009
138 puts "Updated Homebrew from #{old_revision[0,8]} to #{updater.current_revision[0,8]}."
0fa5dc0 @alloy Don't print that there are _and_ aren't formulae updates.
alloy authored Sep 11, 2009
139 if updater.pending_formulae_changes?
35b0b61 @mxcl Remove some ohai() use
mxcl authored Sep 21, 2009
140 ohai "The following formulae were updated:"
141 puts_columns updater.updated_formulae
0fa5dc0 @alloy Don't print that there are _and_ aren't formulae updates.
alloy authored Sep 11, 2009
142 else
35b0b61 @mxcl Remove some ohai() use
mxcl authored Sep 21, 2009
143 puts "No formulae were updated." unless updater.pending_formulae_changes?
0fa5dc0 @alloy Don't print that there are _and_ aren't formulae updates.
alloy authored Sep 11, 2009
144 end
871b25c @alloy Update Homebrew and list the updated formulae.
alloy authored Sep 7, 2009
145 end
146
3cf1226 @mxcl Refactor--object orientate where sensible
mxcl authored Jul 24, 2009
147 when 'ln', 'link'
6b6d369 @mxcl Refactor
mxcl authored Aug 10, 2009
148 ARGV.kegs.each {|keg| puts "#{keg.link} links created for #{keg}"}
149
150 when 'unlink'
151 ARGV.kegs.each {|keg| puts "#{keg.unlink} links removed for #{keg}"}
cc611b1 @mxcl Fix typos
mxcl authored Jul 22, 2009
152
6b6d369 @mxcl Refactor
mxcl authored Aug 10, 2009
153 when 'rm', 'uninstall', 'remove'
154 ARGV.kegs.each do |keg|
155 puts "Uninstalling #{keg}..."
156 keg.uninstall
bc9ab14 @mxcl Faster uninstall
mxcl authored Oct 26, 2009
157 keg.unlink
3cf1226 @mxcl Refactor--object orientate where sensible
mxcl authored Jul 24, 2009
158 end
6b6d369 @mxcl Refactor
mxcl authored Aug 10, 2009
159
3cf1226 @mxcl Refactor--object orientate where sensible
mxcl authored Jul 24, 2009
160 when 'prune'
6b6d369 @mxcl Refactor
mxcl authored Aug 10, 2009
161 prune
3cf1226 @mxcl Refactor--object orientate where sensible
mxcl authored Jul 24, 2009
162
f414bc8 @mxcl `brew make' becomes `brew create'
mxcl authored Sep 7, 2009
163 # 'make' supported until 0.7 for historic reasons
3cf1226 @mxcl Refactor--object orientate where sensible
mxcl authored Jul 24, 2009
164 when 'mk', 'make'
f414bc8 @mxcl `brew make' becomes `brew create'
mxcl authored Sep 7, 2009
165 opoo "`brew make' has changed to `brew create'"
166 puts "This is because make can be confused with the `make' tool."
167 puts "brew make will continue working until Homebrew 0.7"
168 exec __FILE__, "create", *ARGV
169
170 when 'create'
6b6d369 @mxcl Refactor
mxcl authored Aug 10, 2009
171 if ARGV.include? '--macports'
172 exec "open", "http://www.macports.org/ports.php?by=name&substr=#{ARGV.next}"
39b392d @mxcl Don't throw if named.empty?
mxcl authored Oct 26, 2009
173 elsif ARGV.named.empty?
174 raise UsageError
616ab25 @mxcl With brew mk, open with mate if available
mxcl authored Jun 8, 2009
175 else
ecf4d95 @mxcl Only create named arguments
mxcl authored Oct 15, 2009
176 exec_editor *ARGV.named.collect {|name| make name}
616ab25 @mxcl With brew mk, open with mate if available
mxcl authored Jun 8, 2009
177 end
178
50453ee @mxcl Allow configure alias for diy
mxcl authored Aug 22, 2009
179 when 'diy', 'configure'
bfbcdb2 @mxcl brew diy command
mxcl authored Aug 12, 2009
180 puts diy
181
3cf1226 @mxcl Refactor--object orientate where sensible
mxcl authored Jul 24, 2009
182 when 'info', 'abv'
39b392d @mxcl Don't throw if named.empty?
mxcl authored Oct 26, 2009
183 if ARGV.named.empty?
6b6d369 @mxcl Refactor
mxcl authored Aug 10, 2009
184 puts `ls #{HOMEBREW_CELLAR} | wc -l`.strip+" kegs, "+HOMEBREW_CELLAR.abv
3cf1226 @mxcl Refactor--object orientate where sensible
mxcl authored Jul 24, 2009
185 elsif ARGV[0][0..6] == 'http://'
186 puts Pathname.new(ARGV.shift).version
23f9fad @mxcl brew info provides installation status
mxcl authored Jun 13, 2009
187 else
6b6d369 @mxcl Refactor
mxcl authored Aug 10, 2009
188 ARGV.named.each {|name| info name}
dac062e @mxcl Handle -- args properly
mxcl authored Jun 5, 2009
189 end
3cf1226 @mxcl Refactor--object orientate where sensible
mxcl authored Jul 24, 2009
190
72edfbf @mxcl brew install improvements
mxcl authored Oct 26, 2009
191 when 'install'
192 require 'formula_installer'
f4670bd @mxcl Don't require hardware.rb globally
mxcl authored Nov 3, 2009
193 require 'hardware'
72edfbf @mxcl brew install improvements
mxcl authored Oct 26, 2009
194
195 ############################################################ sanity checks
196 case Hardware.cpu_type when :ppc, :dunno
197 abort "Sorry, Homebrew does not support your computer's CPU architecture."
198 end
199
0a19a05 @mxcl Don't error out before Cellar is created
mxcl authored Nov 8, 2009
200 raise "Cannot write to #{HOMEBREW_CELLAR}" if HOMEBREW_CELLAR.exist? and not HOMEBREW_CELLAR.writable?
72edfbf @mxcl brew install improvements
mxcl authored Oct 26, 2009
201 raise "Cannot write to #{HOMEBREW_PREFIX}" unless HOMEBREW_PREFIX.writable?
202
203 ################################################################# warnings
204 if MACOS_VERSION >= 10.6
b43dbfa @mxcl DRY gcc_build and llvm_build
mxcl authored Nov 9, 2009
205 opoo "You should upgrade to Xcode 3.2.1" if llvm_build < 2206
bc32b13 @mxcl Warn users about Xcode versions that are too old
mxcl authored Nov 8, 2009
206 else
394e4fd @adamv Be specific about 3.1 point release.
adamv authored Nov 9, 2009
207 opoo "You should upgrade to Xcode 3.1.4" if gcc_build < 5577
72edfbf @mxcl brew install improvements
mxcl authored Oct 26, 2009
208 end
209
210 if macports_or_fink_installed?
211 opoo "It appears you have Macports or Fink installed"
212 puts "Although, unlikely, this can break builds or cause obscure runtime issues."
213 puts "If you experience problems try uninstalling these tools."
214 end
215
216 ################################################################# install!
217 installer = FormulaInstaller.new
218 installer.install_deps = !ARGV.include?('--ignore-dependencies')
219
220 ARGV.formulae.each do |f|
221 if not f.installed? or ARGV.force?
222 installer.install f
223 else
224 puts "Formula already installed: #{f.prefix}"
225 end
226 end
227
f2a6979 @mxcl brew log command
mxcl authored Sep 24, 2009
228 when 'log'
a772101 @mxcl Use HOMEBREW_REPOSITORY for brew log
mxcl authored Oct 26, 2009
229 Dir.chdir HOMEBREW_REPOSITORY
f2a6979 @mxcl brew log command
mxcl authored Sep 24, 2009
230 exec "git", "log", ARGV.formulae.first.path, *ARGV.options
62cef23 @adamv Add brew command 'uses'
adamv authored Nov 16, 2009
231
232 when 'uses'
233 # For each formula given, show which other formulas depend on it.
234 # We only go one level up, direct dependencies.
235 require 'formula'
236 require 'utils'
237
238 deps = Formula.get_used_by
239
240 ARGV.formulae.each do |f|
241 name = f.name
242 our_deps = deps[name]
243 if our_deps == nil
244 puts "#{name} is not a dependency."
245 else
246 puts "#{name} is a dependency for #{our_deps.join(', ')}."
247 end
248 end
b6ca4dc @adamv New command 'brew deps [formula]'
adamv authored Nov 16, 2009
249
250 when 'deps'
251 require 'formula'
252
253 ARGV.formulae.each do |f|
254 name = f.name
255
256 our_deps = []
257 checked = {}
258 to_check = [name]
259
260 while ! to_check.empty?
261 item = to_check.pop
262 checked[item] = true
263
264 formula = Formulary.read item
265 next if formula == nil || formula.deps == nil || formula.deps.empty?
266
267 our_deps.push(*formula.deps)
268 to_check.push(*formula.deps.select{|g| !checked[g]})
269 end
270
271 if our_deps.empty?
272 puts "#{name} has no dependencies."
273 else
274 our_deps.sort!
275 puts "#{name} depends on #{our_deps.join(", ")}"
276 end
277 end
f2a6979 @mxcl brew log command
mxcl authored Sep 24, 2009
278
8a7b9ea @adamv Add extra message for unknown commands that are git commands.
adamv authored Nov 16, 2009
279 when 'pull', 'push', 'checkout', 'branch'
280 onoe "Unknown command: #{arg} (did you mean 'git #{arg}'?)"
281
f2a6979 @mxcl brew log command
mxcl authored Sep 24, 2009
282 else
178d31b @mxcl Better error for unknown brew commands
mxcl authored Oct 26, 2009
283 onoe "Unknown command: #{arg}"
d614113 @mxcl Refactor Formulae
mxcl authored Jun 2, 2009
284 end
2a5a754 @mxcl brew prefix command
mxcl authored May 23, 2009
285
1b066d7 @mxcl Better errors if missing keg or formula arguments
mxcl authored Oct 26, 2009
286 rescue FormulaUnspecifiedError
a785a5e @mxcl dump_config for certain exceptions
mxcl authored Nov 11, 2009
287 abort "This command requires a formula argument"
1b066d7 @mxcl Better errors if missing keg or formula arguments
mxcl authored Oct 26, 2009
288 rescue KegUnspecifiedError
a785a5e @mxcl dump_config for certain exceptions
mxcl authored Nov 11, 2009
289 abort "This command requires a keg argument"
ea7c891 @mxcl Raise if ARGV.named and no named arguments
mxcl authored Aug 11, 2009
290 rescue UsageError
291 onoe "Invalid usage"
a785a5e @mxcl dump_config for certain exceptions
mxcl authored Nov 11, 2009
292 abort ARGV.usage
6b6d369 @mxcl Refactor
mxcl authored Aug 10, 2009
293 rescue SystemExit
f0eb547 @mxcl Fixed SIGINT handling, so we can have our newline
mxcl authored Oct 26, 2009
294 puts "Kernel.exit" if ARGV.verbose?
1912cbb @mxcl Re-raise SystemExit so the correct exit code is set
mxcl authored Nov 11, 2009
295 raise
6b6d369 @mxcl Refactor
mxcl authored Aug 10, 2009
296 rescue Interrupt => e
f0eb547 @mxcl Fixed SIGINT handling, so we can have our newline
mxcl authored Oct 26, 2009
297 puts # seemingly a newline is typical
6b6d369 @mxcl Refactor
mxcl authored Aug 10, 2009
298 exit 130
70bed07 @mxcl More tweaking of main exception handler output
mxcl authored Nov 12, 2009
299 rescue BuildError => e
300 ohai "Backtrace"
301 puts e.backtrace
302 ohai "Environment"
303 dump_config
304 puts "Exit status: #{e.status}"
305 onoe e
306 puts PLEASE_REPORT_BUG
307 exit 1
308 rescue RuntimeError, SystemCallError => e
309 onoe e
310 puts e.backtrace if ARGV.debug?
311 exit 1
6b6d369 @mxcl Refactor
mxcl authored Aug 10, 2009
312 rescue Exception => e
a785a5e @mxcl dump_config for certain exceptions
mxcl authored Nov 11, 2009
313 onoe e
70bed07 @mxcl More tweaking of main exception handler output
mxcl authored Nov 12, 2009
314 puts PLEASE_REPORT_BUG
315 puts e.backtrace
419cf71 @mxcl Return non-zero error code on errors
mxcl authored Sep 23, 2009
316 exit 1
118b41b @mxcl Refactor $foo into HOMEBREW_FOO
mxcl authored Jul 31, 2009
317 end
Something went wrong with that request. Please try again.