diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index 1f04ef3dde..c5d4569550 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -166,8 +166,9 @@ class Formulary elsif name_or_path.include? "/" # If name was a path or mapped to a cached formula f = FromPathLoader.new(name_or_path) + elsif name_or_path =~ /\.rb$/ + f = FromPathLoader.new("./#{name_or_path}") else - # For names, map to the path and then require f = StandardLoader.new(name_or_path) end end