Use system path for more tools, for Linux compat.
Closes Homebrew/homebrew#22196. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
parent
6e4ad9eb22
commit
51d1a8e3c5
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user