aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/create.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/create.rb b/Library/Homebrew/cmd/create.rb
index 70b060871..cd23153bc 100644
--- a/Library/Homebrew/cmd/create.rb
+++ b/Library/Homebrew/cmd/create.rb
@@ -78,9 +78,11 @@ class FormulaCreator
@url = url
path = Pathname.new(url)
if @name.nil?
+ %r{github.com/\S+/(\S+)/archive/}.match url
+ @name ||= $1
/(.*?)[-_.]?#{path.version}/.match path.basename
- @name = $1
- @path = Formula.path $1 unless $1.nil?
+ @name ||= $1
+ @path = Formula.path @name unless @name.nil?
else
@path = Formula.path name
end