diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index c2bef22c24..a7cea5cf84 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -333,10 +333,10 @@ class Formula install_type = :from_url else # Check if this is a name or pathname - path = Pathname.new(name) - if path.absolute? - # For absolute paths, just require the path + if name.include? "/" + # For paths, just require the path require name + path = Pathname.new(name) name = path.stem install_type = :from_path target_file = path.to_s