Merge pull request #1859 from MikeMcQuaid/brew-create-null-version

create: handle null versions.
This commit is contained in:
Mike McQuaid 2017-01-17 10:07:40 +00:00 committed by GitHub
commit 052d6077dd

View File

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