linkapps: replace #max_by with #max
Enumerable#max_by didn't exist in 1.8.6, so linkapps failed on Leopard.
This commit is contained in:
parent
515578723e
commit
92d65aace7
@ -13,7 +13,7 @@ HOMEBREW_CELLAR.subdirs.each do |rack|
|
||||
kegs = rack.subdirs.map { |d| Keg.new(d) }
|
||||
next if kegs.empty?
|
||||
|
||||
keg = kegs.detect(&:linked?) || kegs.max_by(&:version)
|
||||
keg = kegs.detect(&:linked?) || kegs.max {|a,b| a.version <=> b.version}
|
||||
|
||||
Dir["#{keg}/*.app", "#{keg}/bin/*.app", "#{keg}/libexec/*.app"].each do |app|
|
||||
puts "Linking #{app}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user