aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMisty De Meo2012-12-07 17:13:36 -0800
committerMisty De Meo2016-04-22 22:37:21 -0700
commit0f7caa154fbe8ffc93ecf5a371693fc894280989 (patch)
tree45b15fcbf89d9969640d830ccdfeaed1a87a5ba8 /Library
parent2c9fd850f35d30e99ac72946c3fdb88abf21a940 (diff)
downloadbrew-0f7caa154fbe8ffc93ecf5a371693fc894280989.tar.bz2
Tiger tar requires explicit format
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/download_strategy.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index 53abf6c40..c3124feb6 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -192,7 +192,14 @@ class AbstractFileDownloadStrategy < AbstractDownloadStrategy
with_system_path { buffered_write("bunzip2") }
when :gzip, :bzip2, :compress, :tar
# Assume these are also tarred
- tar_flags = (ARGV.verbose? && ENV["TRAVIS"].nil?) ? "xvf" : "xf"
+ tar_flags = (ARGV.verbose? && ENV["TRAVIS"].nil?) ? "xv" : "x"
+ # Older versions of tar require an explicit format flag
+ if cached_location.compression_type == :gzip
+ tar_flags << "z"
+ elsif cached_location.compression_type == :bzip2
+ tar_flags << "j"
+ end
+ tar_flags << "f"
with_system_path { safe_system "tar", tar_flags, cached_location }
chdir
when :xz