aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorDan Hughes2013-08-24 10:02:40 -0400
committerAdam Vandenberg2013-08-30 13:02:19 -0700
commit54a6cffe8cc4da368e71913dd35151a3ed0ed962 (patch)
tree40c684832210a7f64f5b224ec936ca04c0879c2c /Library/Homebrew
parent34cbf268f1f42475b791072edb8005fea5a781b0 (diff)
downloadhomebrew-54a6cffe8cc4da368e71913dd35151a3ed0ed962.tar.bz2
Use system path for more tools, for Linux compat.
Closes #22196. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/cmd/doctor.rb2
-rw-r--r--Library/Homebrew/formula.rb4
-rw-r--r--Library/Homebrew/utils.rb2
3 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index c1921c975..3dff2e9ef 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -660,7 +660,7 @@ def check_for_multiple_volumes
real_cellar = HOMEBREW_CELLAR.realpath
tmp_prefix = ENV['HOMEBREW_TEMP'] || '/tmp'
- tmp = Pathname.new `/usr/bin/mktemp -d #{tmp_prefix}/homebrew-brew-doctor-XXXX`.strip
+ tmp = Pathname.new with_system_path { `mktemp -d #{tmp_prefix}/homebrew-brew-doctor-XXXX` }.strip
real_temp = tmp.realpath.parent
where_cellar = volumes.which real_cellar
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index cde6da4e4..888eefd9f 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -612,8 +612,8 @@ class Formula
ohai "Patching"
patch_list.each do |p|
case p.compression
- when :gzip then safe_system "/usr/bin/gunzip", p.compressed_filename
- when :bzip2 then safe_system "/usr/bin/bunzip2", p.compressed_filename
+ when :gzip then with_system_path { safe_system "gunzip", p.compressed_filename }
+ when :bzip2 then with_system_path { safe_system "bunzip2", p.compressed_filename }
end
# -f means don't prompt the user if there are errors; just exit with non-zero status
safe_system '/usr/bin/patch', '-f', *(p.patch_args)
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index b10764803..f99b0a03e 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -203,7 +203,7 @@ end
# GZips the given paths, and returns the gzipped paths
def gzip *paths
paths.collect do |path|
- system "/usr/bin/gzip", path
+ with_system_path { safe_system 'gzip', path }
Pathname.new("#{path}.gz")
end
end