aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Library/Homebrew/cmd/create.rb4
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