aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMax Howell2009-09-23 16:44:10 +0100
committerMax Howell2009-09-24 18:26:24 +0100
commit44a1fa418e4251486ac811d1f8a2db99847f69b5 (patch)
tree12c9539f4d7f117820c412a9e006fe686c13e12e /bin
parent034fc40ae122f0d99ea0793264ed74c986866327 (diff)
downloadbrew-44a1fa418e4251486ac811d1f8a2db99847f69b5.tar.bz2
Use full paths to all system utilities
Otherwise you run the risk of not running the exact version / make of the utility you planned. Fixes Homebrew/homebrew#48 Really we need to do this formula too, so I guess a make and cmake function are on the way…
Diffstat (limited to 'bin')
-rwxr-xr-xbin/brew6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/brew b/bin/brew
index 5664ee5a7..465d928c7 100755
--- a/bin/brew
+++ b/bin/brew
@@ -11,20 +11,20 @@ if %w[/ /usr].include? HOMEBREW_PREFIX.to_s then abort <<-EOS
#{HOMEBREW_WWW}
EOS
end
-if `sw_vers -productVersion` =~ /10\.(\d)\.(\d+)/ and $1.to_i < 5
# remove MacPorts and Fink from the PATH, this prevents issues like:
# http://github.com/mxcl/homebrew/issues/#issue/13
# http://github.com/mxcl/homebrew/issues/#issue/48
fix_PATH
+if `/usr/bin/sw_vers -productVersion` =~ /10\.(\d)\.(\d+)/ and $1.to_i < 5
onoe "Homebrew requires Leopard or higher"
abort "But thanks for your interest anyway!"
end
if Hardware.cpu_type == :ppc or Hardware.cpu_type == :dunno
abort "Sorry, Homebrew does not support your computer's CPU architecture."
end
-unless system "which -s gcc-4.2" and $?.success?
+unless system "/usr/bin/which -s gcc-4.2"
abort "Sorry, Homebrew requires gcc 4.2, which is provided by Xcode 3.1"
end
@@ -94,7 +94,7 @@ begin
end
unless ARGV.force?
- unless system "which #{ENV['CC'] or 'cc'} &> /dev/null" and $?.success?
+ unless system "/usr/bin/which -s #{ENV.cc}"
raise "We cannot find a c compiler, have you installed the latest Xcode?"
end
formulae = ARGV.formulae.reject do |f|