aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/download_strategy.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index 90b6c92ae..9fc10ce17 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -107,9 +107,13 @@ class CurlDownloadStrategy < AbstractDownloadStrategy
# regardless of the current working directory; the only way to
# write elsewhere is to use the stdout
with_system_path do
- data = `gunzip -f "#{@tarball_path}" -c`
- File.open(File.basename(basename_without_params, '.gz'), 'w') do |f|
- f.write data
+ target = File.basename(basename_without_params, ".gz")
+
+ IO.popen("gunzip -f '#{@tarball_path}' -c") do |pipe|
+ File.open(target, "w") do |f|
+ buf = ""
+ f.write(buf) while pipe.read(1024, buf)
+ end
end
end
when :gzip, :bzip2, :compress, :tar