diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/audit.rb | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 88b3a819c..a0359ae07 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -114,16 +114,10 @@ class FormulaAuditor end end - def audit_deps - # Don't depend_on aliases; use full name - @@aliases ||= Formula.aliases + @@aliases ||= Formula.aliases + def audit_deps @specs.each do |spec| - spec.deps.select { |d| @@aliases.include? d.name }.each do |d| - real_name = d.to_formula.name - problem "Dependency '#{d}' is an alias; use the canonical name '#{real_name}'." - end - # Check for things we don't like to depend on. # We allow non-Homebrew installs whenever possible. spec.deps.each do |dep| @@ -137,6 +131,10 @@ class FormulaAuditor next end + if @@aliases.include?(dep.name) + problem "Dependency '#{dep.name}' is an alias; use the canonical name '#{dep.to_formula.name}'." + end + dep.options.reject do |opt| next true if dep_f.option_defined?(opt) dep_f.requirements.detect do |r| |
