aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend
diff options
context:
space:
mode:
authorRyan Hendrickson2015-05-25 00:05:32 -0400
committerJack Nagel2015-05-25 22:01:12 -0400
commit798711cade2fbd95147d4eac32a7a583f21cfb82 (patch)
tree6e1b68b7f20f270cadae5c4f04971453549ea0a6 /Library/Homebrew/extend
parent664c8deaab7ee56552a8e5f39adb621b36d29e6e (diff)
downloadbrew-798711cade2fbd95147d4eac32a7a583f21cfb82.tar.bz2
Use canonical representation of the superenv bin directory
The xcrun script should be skipping the ENV directory when it scans $PATH looking for tools to run. Unfortunately, the script compares the paths found to the real path of the ENV directory (following symlinks), but superenv was adding the nominal path to $PATH, not following symlinks. As a consequence, platforms with Xcode < 4.3 would get into infinite loops when trying to call non-system versions of gcc, as xcrun calls the ENV version of gcc-X.X which calls xcrun and so on forever. This commit changes superenv to follow symlinks when determining the bin path to use. Fixes Homebrew/homebrew#33731. Closes Homebrew/homebrew#40062. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew/extend')
-rw-r--r--Library/Homebrew/extend/ENV/super.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/Library/Homebrew/extend/ENV/super.rb b/Library/Homebrew/extend/ENV/super.rb
index bf2f997c6..e21fc554e 100644
--- a/Library/Homebrew/extend/ENV/super.rb
+++ b/Library/Homebrew/extend/ENV/super.rb
@@ -23,7 +23,8 @@ module Superenv
end
def self.bin
- (HOMEBREW_REPOSITORY/"Library/ENV").subdirs.reject { |d| d.basename.to_s > MacOS::Xcode.version }.max
+ bin = (HOMEBREW_REPOSITORY/"Library/ENV").subdirs.reject { |d| d.basename.to_s > MacOS::Xcode.version }.max
+ bin.realpath unless bin.nil?
end
def reset