download_strategy: untar verbosely when --verbose is present

Closes Homebrew/homebrew#47555.
Closes Homebrew/homebrew#47649.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
This commit is contained in:
Zhiming Wang 2016-01-03 15:11:55 -08:00 committed by Baptiste Fontaine
parent e7738d067f
commit d7b6230aed

View File

@ -184,7 +184,8 @@ class AbstractFileDownloadStrategy < AbstractDownloadStrategy
with_system_path { buffered_write("bunzip2") } with_system_path { buffered_write("bunzip2") }
when :gzip, :bzip2, :compress, :tar when :gzip, :bzip2, :compress, :tar
# Assume these are also tarred # Assume these are also tarred
with_system_path { safe_system "tar", "xf", cached_location } tar_flags = ARGV.verbose? ? "xvf" : "xf"
with_system_path { safe_system "tar", tar_flags, cached_location }
chdir chdir
when :xz when :xz
with_system_path { pipe_to_tar(xzpath) } with_system_path { pipe_to_tar(xzpath) }