diff options
| author | Misty De Meo | 2012-06-25 15:13:35 -0500 |
|---|---|---|
| committer | Misty De Meo | 2012-06-25 15:13:35 -0500 |
| commit | 2baf6487d1c876a86a97af0b0d10a5aa9e07d172 (patch) | |
| tree | 054f561f14ca4866f8d3f22fff633f2f24eb768f /Library/Homebrew | |
| parent | f165e0cf5fe283f9d4e61900ddd749540e82b231 (diff) | |
| download | brew-2baf6487d1c876a86a97af0b0d10a5aa9e07d172.tar.bz2 | |
Hotfix for stack overflow
Under certain circumstances, MacOS.locate and MacOS.dev_tools_path would call
each other recursively. This was limited to systems with Xcode minus the CLT.
See Homebrew/homebrew#13012.
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/utils.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index e71fc12f8..cb051e52e 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -320,7 +320,7 @@ module MacOS extend self # xcode-select is not configured properly (i.e. xctools_fucked?). p = "#{MacOS.xcode_prefix}/Toolchains/XcodeDefault.xctoolchain/usr/bin/#{tool}" if File.executable? p - path Pathname.new p + path = Pathname.new p else path = nil end @@ -334,9 +334,6 @@ module MacOS extend self @dev_tools_path ||= if File.exist? "/usr/bin/cc" and File.exist? "/usr/bin/make" # probably a safe enough assumption (the unix way) Pathname.new "/usr/bin" - elsif not xctools_fucked? - # The new way of finding stuff via locate: - Pathname.new(locate 'make').dirname elsif File.exist? "#{xcode_prefix}/usr/bin/make" # cc stopped existing with Xcode 4.3, there are c89 and c99 options though Pathname.new "#{xcode_prefix}/usr/bin" |
