mirror of
https://github.com/mistydemeo/tigerbrew.git
synced 2026-11-26 19:09:48 -05:00
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>
This commit is contained in:
1 parent
cf9f65d5a0
commit
dde7901b94
1 file changed
+2
-2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user