aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorJack Nagel2014-04-30 15:04:02 -0500
committerJack Nagel2014-04-30 15:04:41 -0500
commit5c05504a66d9d6d1f90729728b1a4d2f9486b3c2 (patch)
treefafff9dc634c07085ea98a556582f74be43ae9c8 /install
parent0f09260c76797048be806b88e88135d6448d5afb (diff)
downloadhomebrew-5c05504a66d9d6d1f90729728b1a4d2f9486b3c2.tar.bz2
Validate the output of xcrun more thoroughly
Noticed when installing Homebrew on a fresh install of 10.7 printed this: -e:204: command not found: Error: /usr/bin/xcode-select returned unexpected error. --version
Diffstat (limited to 'install')
-rwxr-xr-xinstall4
1 files changed, 2 insertions, 2 deletions
diff --git a/install b/install
index dae9783b5..0d131ca44 100755
--- a/install
+++ b/install
@@ -80,8 +80,8 @@ def git
elsif Kernel.system '/usr/bin/which -s git'
'git'
else
- s = `xcrun -find git 2>/dev/null`.chomp
- s if $? and not s.empty?
+ exe = `xcrun -find git 2>/dev/null`.chomp
+ exe if $? && $?.success? && !exe.empty? && File.executable?(exe)
end
return unless @git