From 0f7caa154fbe8ffc93ecf5a371693fc894280989 Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Fri, 7 Dec 2012 17:13:36 -0800 Subject: [PATCH] Tiger tar requires explicit format --- Library/Homebrew/download_strategy.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 53abf6c40d..c3124feb65 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