aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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