Cater to download strategies not yielding a file

Closes Homebrew/homebrew#22580.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
Samuel Cochran 2013-09-16 10:58:47 +10:00 committed by Jack Nagel
parent 84cbfb164e
commit 23c869afee
2 changed files with 2 additions and 2 deletions

View File

@ -611,7 +611,7 @@ class Formula
def stage
fetched = fetch
verify_download_integrity(fetched) if fetched.file?
verify_download_integrity(fetched) if fetched.respond_to?(:file?) and fetched.file?
mktemp do
downloader.stage
# Set path after the downloader changes the working folder.

View File

@ -25,7 +25,7 @@ class Resource
# A target or a block must be given, but not both
def stage(target=nil)
fetched = fetch
verify_download_integrity(fetched) if fetched.file?
verify_download_integrity(fetched) if fetched.respond_to?(:file?) and fetched.file?
mktemp do
@downloader.stage
if block_given?