Skip to content

HTTPS clone URL

Subversion checkout URL

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