aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McQuaid2017-05-09 15:07:25 +0100
committerMike McQuaid2017-05-09 15:10:57 +0100
commit76f48d338e907073fe3bcc39858ff09bdb92aa18 (patch)
treeb5e1931c6bd7963b3a043423eaaac62835e1edb6
parentf1d4c4be78905be0d5fd83922ff1262ed92ba4e8 (diff)
downloadbrew-76f48d338e907073fe3bcc39858ff09bdb92aa18.tar.bz2
keg: skip opt versioned aliases for devel/head.
These versioned aliases don’t correspond to the correct version if not Installed from stable. Fixes #2596.
-rw-r--r--Library/Homebrew/keg.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb
index d4b9c5d77..8733def27 100644
--- a/Library/Homebrew/keg.rb
+++ b/Library/Homebrew/keg.rb
@@ -468,7 +468,10 @@ class Keg
end
def aliases
- Formulary.from_rack(rack).aliases
+ formula = Formulary.from_rack(rack)
+ aliases = formula.aliases
+ return aliases if formula.stable?
+ aliases.reject { |a| a.include?("@") }
rescue FormulaUnavailableError
[]
end