aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formulary.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb
index c2f977c2e..34e40fa23 100644
--- a/Library/Homebrew/formulary.rb
+++ b/Library/Homebrew/formulary.rb
@@ -176,11 +176,9 @@ class Formulary
# name appears to be a tapped formula, so we don't munge it
# in order to provide a useful error message when require fails.
f = TapLoader.new(name_or_path)
- elsif name_or_path.include? "/"
+ elsif name_or_path.include?("/") || File.extname(name_or_path) == ".rb"
# If name was a path or mapped to a cached formula
f = FromPathLoader.new(name_or_path)
- elsif File.extname(name_or_path) == ".rb"
- f = FromPathLoader.new(name_or_path)
else
f = StandardLoader.new(name_or_path)
end