From 2e340625f83ad73ede4b9d1c15f8e5951fbe29fe Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Sat, 12 Mar 2011 16:37:56 -0800 Subject: [PATCH] Allow 'brew install' on relative paths --- Library/Homebrew/formula.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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