Merge pull request #2241 from ilovezfs/bump-formula-pr-die-without-version

bump-formula-pr: check for version presence.
This commit is contained in:
ilovezfs 2017-03-01 05:41:35 -08:00 committed by GitHub
commit e022239608

View File

@ -174,6 +174,7 @@ module Homebrew
rsrc.download_strategy = CurlDownloadStrategy
rsrc.owner = Resource.new(formula.name)
rsrc.version = forced_version if forced_version
odie "No version specified!" unless rsrc.version
rsrc_path = rsrc.fetch
if Utils.popen_read("/usr/bin/tar", "-tf", rsrc_path) =~ %r{/.*\.}
new_hash = rsrc_path.sha256