Skip to content
Snippets Groups Projects
Commit 9a89878b authored by Jack Nagel's avatar Jack Nagel
Browse files

Revert "Skip temporary directory when target directory is known"

This reverts commit 028ee18b851497f8aede55004bcdcc5c16f087cc.
parent 5ca4dbfd
No related branches found
No related tags found
No related merge requests found
......@@ -85,13 +85,13 @@ class Resource
# If block is given, yield to that block
# A target or a block must be given, but not both
def unpack(target=nil)
if target
mkdir_p(target)
chdir(target) { downloader.stage }
elsif block_given?
mktemp(download_name) do
downloader.stage
mktemp(download_name) do
downloader.stage
if block_given?
yield self
elsif target
target = Pathname.new(target) unless target.is_a? Pathname
target.install Dir['*']
end
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment