From fa7291f21b0fa7bc43a38cfbe2df38ba9ad449a8 Mon Sep 17 00:00:00 2001 From: Shaun Jackman Date: Thu, 6 Jun 2013 15:01:38 -0700 Subject: [PATCH] CurlDownloadStrategy: use with_system_path to locate tar Closes Homebrew/homebrew#20316. Signed-off-by: Jack Nagel --- Library/Homebrew/download_strategy.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 90fa724dc0..b615fc2c92 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -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)