aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/resource.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/Library/Homebrew/resource.rb b/Library/Homebrew/resource.rb
index f6b417fc5..573a7bcb1 100644
--- a/Library/Homebrew/resource.rb
+++ b/Library/Homebrew/resource.rb
@@ -72,8 +72,11 @@ class Resource
downloader.clear_cache
end
- # Fetch, verify, and unpack the resource
def stage(target=nil, &block)
+ unless target || block
+ raise ArgumentError, "target directory or block is required"
+ end
+
verify_download_integrity(fetch)
unpack(target, &block)
end