aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-cmd
diff options
context:
space:
mode:
authorJCount2017-05-17 15:18:59 -0400
committerJCount2017-05-17 15:18:59 -0400
commitcd8d7a8a44ccc79c08b111bfae8b01fc33302329 (patch)
tree4aa99839ddb13edeb573dd3c81c653d06694c311 /Library/Homebrew/dev-cmd
parent2b726383f1712e5a34627b4db9bed8b7b81973b2 (diff)
downloadbrew-cd8d7a8a44ccc79c08b111bfae8b01fc33302329.tar.bz2
audit: fix full versioned alias name resolution in taps
This fixes an issue where audit would prompt for the creation of an already existing versioned alias while at the same time declaring the existing alias invalid.
Diffstat (limited to 'Library/Homebrew/dev-cmd')
-rw-r--r--Library/Homebrew/dev-cmd/audit.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb
index cbe26b422..ce111d9dd 100644
--- a/Library/Homebrew/dev-cmd/audit.rb
+++ b/Library/Homebrew/dev-cmd/audit.rb
@@ -323,6 +323,10 @@ class FormulaAuditor
end
valid_alias_names = [alias_name_major, alias_name_major_minor]
+ if formula.tap
+ valid_alias_names.map! { |a| "#{formula.tap}/#{a}" }
+ end
+
valid_versioned_aliases = versioned_aliases & valid_alias_names
invalid_versioned_aliases = versioned_aliases - valid_alias_names