Merge pull request #1629 from zmwangx/bump-formula-pr-download-to-correct-version

bump-formula-pr: use correct version in download path when --version is specified
This commit is contained in:
Mike McQuaid 2016-12-07 22:09:54 +00:00 committed by GitHub
commit 60b1be6795

View File

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