diff options
| author | Jack Nagel | 2013-02-01 13:36:53 -0600 | 
|---|---|---|
| committer | Jack Nagel | 2013-02-01 13:36:53 -0600 | 
| commit | 773812e86c904496396a5208c731610ccba6d1fe (patch) | |
| tree | 5e36af2e970ba8751509eecd14a7c15339cacf38 /Library/Homebrew/macos.rb | |
| parent | 56a978ba1d29133d4c0893f9a4c9c651524a4c07 (diff) | |
| download | homebrew-773812e86c904496396a5208c731610ccba6d1fe.tar.bz2 | |
Don't call methods on xcrun_path if it's nil
Diffstat (limited to 'Library/Homebrew/macos.rb')
| -rw-r--r-- | Library/Homebrew/macos.rb | 7 | 
1 files changed, 3 insertions, 4 deletions
diff --git a/Library/Homebrew/macos.rb b/Library/Homebrew/macos.rb index 47573e3a3..3d7defa6f 100644 --- a/Library/Homebrew/macos.rb +++ b/Library/Homebrew/macos.rb @@ -36,12 +36,11 @@ module MacOS extend self          # look in dev_tools_path, and finally in xctoolchain_path, because the          # tools were split over two locations beginning with Xcode 4.3+.          xcrun_path = unless Xcode.bad_xcode_select_path? -          `/usr/bin/xcrun -find #{tool} 2>/dev/null`.chomp +          path = `/usr/bin/xcrun -find #{tool} 2>/dev/null`.chomp +          # If xcrun finds a superenv tool then discard the result. +          path unless path.include?(HOMEBREW_PREFIX/"Library/ENV")          end -        # If xcrun finds a superenv tool then discard the result. -        xcrun_path = nil if xcrun_path.include? HOMEBREW_PREFIX+"Library/ENV" -          paths = %W[#{xcrun_path}                     #{dev_tools_path}/#{tool}                     #{xctoolchain_path}/usr/bin/#{tool}]  | 
