diff options
| author | Jack Nagel | 2012-01-31 17:57:20 -0600 |
|---|---|---|
| committer | Jack Nagel | 2012-01-31 17:57:20 -0600 |
| commit | dde7901b94d93bdbbc86355d508f1ecd3e7116ef (patch) | |
| tree | e0e82aaeb76c1357bc720ace170843b1ec4d0176 /Library | |
| parent | cf9f65d5a0155fe860f40317ba07f13d3fdd3ac7 (diff) | |
| download | homebrew-dde7901b94d93bdbbc86355d508f1ecd3e7116ef.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')
| -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 |
