aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xLibrary/Contributions/cmd/brew-linkapps.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Contributions/cmd/brew-linkapps.rb b/Library/Contributions/cmd/brew-linkapps.rb
index cf394b479..ce3f4960a 100755
--- a/Library/Contributions/cmd/brew-linkapps.rb
+++ b/Library/Contributions/cmd/brew-linkapps.rb
@@ -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}"