From aa49da260082deb6d3ec3492d6c836e6ad709ba7 Mon Sep 17 00:00:00 2001 From: Ryan Hendrickson Date: Tue, 2 Jun 2015 21:41:25 -0400 Subject: utils: prefer keg curl over system on 10.6 Closes Homebrew/homebrew#39927. Signed-off-by: Mike McQuaid --- Library/Homebrew/utils.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Library') diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index beb9e05cb..8a8fa46b8 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -175,7 +175,12 @@ def quiet_system cmd, *args end def curl *args - curl = Pathname.new '/usr/bin/curl' + brewed_curl = HOMEBREW_PREFIX/"opt/curl/bin/curl" + curl = if MacOS.version <= "10.6" && brewed_curl.exist? + brewed_curl + else + Pathname.new '/usr/bin/curl' + end raise "#{curl} is not executable" unless curl.exist? and curl.executable? flags = HOMEBREW_CURL_ARGS -- cgit v1.2.3