Skip to content
Snippets Groups Projects
Commit 51bec382 authored by Jack Nagel's avatar Jack Nagel
Browse files

Make conditional more obvious

parent 281494c2
No related branches found
No related tags found
No related merge requests found
......@@ -394,9 +394,12 @@ class Formula
if name =~ %r{(.+)/(.+)/(.+)}
tap_name = "#$1-#$2".downcase
tapd = Pathname.new("#{HOMEBREW_LIBRARY}/Taps/#{tap_name}")
tapd.find_formula do |relative_pathname|
return "#{tapd}/#{relative_pathname}" if relative_pathname.stem.to_s == $3
end if tapd.directory?
if tapd.directory?
tapd.find_formula do |relative_pathname|
return "#{tapd}/#{relative_pathname}" if relative_pathname.stem.to_s == $3
end
end
end
# Otherwise don't resolve paths or URLs
return name
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment