CurlDownloadStrategy: use with_system_path to locate tar

Closes Homebrew/homebrew#20316.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
Shaun Jackman 2013-06-06 15:01:38 -07:00 committed by Jack Nagel
parent 4412df2c00
commit fa7291f21b

View File

@ -115,7 +115,9 @@ class CurlDownloadStrategy < AbstractDownloadStrategy
chdir
when :xz
raise "You must install XZutils: brew install xz" unless which "xz"
safe_system "xz -dc \"#{@tarball_path}\" | /usr/bin/tar xf -"
with_system_path {
safe_system "#{Formula.factory('xz').bin}/xz -dc \"#{@tarball_path}\" | tar xf -"
}
chdir
when :pkg
safe_system '/usr/sbin/pkgutil', '--expand', @tarball_path, File.basename(@url)