From d09153763624096d6a300f02ce395f03967d01af Mon Sep 17 00:00:00 2001 From: Uladzislau Shablinski Date: Mon, 26 Dec 2016 20:16:04 +0300 Subject: [PATCH] Don't drop .rb suffix for formula names Fixes #1718 --- Library/Homebrew/formulary.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index 6ed5b91ba7..7e8811c9a6 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -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?