diff options
| author | Jack Nagel | 2012-01-31 17:57:20 -0600 |
|---|---|---|
| committer | Jack Nagel | 2012-01-31 17:57:20 -0600 |
| commit | 66388b7a437165507bbf3cc42d47482ceb7e0bc3 (patch) | |
| tree | 22415985112077ef4d6f18126bb57a0a8586c062 /Library/Homebrew | |
| parent | a86f5241560cc7f8f9702f4177b76b342f8090c5 (diff) | |
| download | brew-66388b7a437165507bbf3cc42d47482ceb7e0bc3.tar.bz2 | |
create: punt on bad URLs
When we can't detect a name from the URL, just ask the user.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/cmd/create.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/create.rb b/Library/Homebrew/cmd/create.rb index 3721d5986..4ea06a610 100644 --- a/Library/Homebrew/cmd/create.rb +++ b/Library/Homebrew/cmd/create.rb @@ -20,7 +20,7 @@ module Homebrew extend self :autotools end - if fc.name.to_s.strip.empty? + if fc.name.nil? or fc.name.to_s.strip.empty? path = Pathname.new url print "Formula name [#{path.stem}]: " fc.name = __gets || path.stem @@ -67,7 +67,7 @@ class FormulaCreator path = Pathname.new url /(.*?)[-_.]?#{path.version}/.match path.basename @name = $1 - @path = Formula.path $1 + @path = Formula.path $1 unless $1.nil? end def version |
