aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Vandenberg2011-03-12 16:37:56 -0800
committerAdam Vandenberg2011-03-12 16:37:56 -0800
commit2e340625f83ad73ede4b9d1c15f8e5951fbe29fe (patch)
tree0631a3b883db88b0dcb1951ea3ad48cd01411d28
parent6fecafb0aae4ca8474eeadfeffcca729d6c43358 (diff)
downloadbrew-2e340625f83ad73ede4b9d1c15f8e5951fbe29fe.tar.bz2
Allow 'brew install' on relative paths
-rw-r--r--Library/Homebrew/formula.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index c2bef22c2..a7cea5cf8 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