aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2017-07-21 17:20:12 +0100
committerMike McQuaid2017-07-21 17:20:12 +0100
commit43c8223dcc0660852be56a5296d515a1a52a2784 (patch)
tree6ea6b6dde1c4c9366c4c1d46d743a4c67549841e /Library
parent9747bc397a43f082aaaec24d4583ec465349eead (diff)
downloadbrew-43c8223dcc0660852be56a5296d515a1a52a2784.tar.bz2
formula: ensure aliases don’t include full names.
Aliases that include `/`s end up creating directories and this is bad.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index b2e4ff988..939f356da 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -383,7 +383,9 @@ class Formula
# All of aliases for the formula
def aliases
@aliases ||= if tap
- tap.alias_reverse_table[full_name] || []
+ tap.alias_reverse_table[full_name].to_a.map do |a|
+ a.split("/")[-1]
+ end
else
[]
end