Merge pull request #1733 from vladshablinsky/rb_in_name

Don't drop .rb suffix for formula names
This commit is contained in:
Mike McQuaid 2016-12-29 12:32:12 +00:00 committed by GitHub
commit 85f62afae6

View File

@ -333,7 +333,9 @@ class Formulary
return TapLoader.new(ref, from: from)
end
return FromPathLoader.new(ref) if File.extname(ref) == ".rb"
if File.extname(ref) == ".rb" && Pathname.new(ref).expand_path.exist?
return FromPathLoader.new(ref)
end
formula_with_that_name = core_path(ref)
if formula_with_that_name.file?