Make conditional more obvious

This commit is contained in:
Jack Nagel 2014-03-01 17:49:57 -06:00
parent 281494c255
commit 51bec382b0

View File

@ -394,9 +394,12 @@ class Formula
if name =~ %r{(.+)/(.+)/(.+)} if name =~ %r{(.+)/(.+)/(.+)}
tap_name = "#$1-#$2".downcase tap_name = "#$1-#$2".downcase
tapd = Pathname.new("#{HOMEBREW_LIBRARY}/Taps/#{tap_name}") tapd = Pathname.new("#{HOMEBREW_LIBRARY}/Taps/#{tap_name}")
if tapd.directory?
tapd.find_formula do |relative_pathname| tapd.find_formula do |relative_pathname|
return "#{tapd}/#{relative_pathname}" if relative_pathname.stem.to_s == $3 return "#{tapd}/#{relative_pathname}" if relative_pathname.stem.to_s == $3
end if tapd.directory? end
end
end end
# Otherwise don't resolve paths or URLs # Otherwise don't resolve paths or URLs
return name return name