create: handle null versions.

Fixes #1821
This commit is contained in:
Mike McQuaid 2017-01-16 20:15:20 +00:00
parent 133e59724a
commit feea90c0dd

View File

@ -142,12 +142,10 @@ class FormulaCreator
def generate!
raise "#{path} already exists" if path.exist?
if version.nil?
if version.nil? || version.null?
opoo "Version cannot be determined from URL."
puts "You'll need to add an explicit 'version' to the formula."
end
if fetch? && version
elsif fetch?
r = Resource.new
r.url(url)
r.version(version)