Don't call methods on xcrun_path if it's nil
This commit is contained in:
parent
1bb5d4e031
commit
7b93130a39
@ -36,12 +36,11 @@ module MacOS extend self
|
|||||||
# look in dev_tools_path, and finally in xctoolchain_path, because the
|
# look in dev_tools_path, and finally in xctoolchain_path, because the
|
||||||
# tools were split over two locations beginning with Xcode 4.3+.
|
# tools were split over two locations beginning with Xcode 4.3+.
|
||||||
xcrun_path = unless Xcode.bad_xcode_select_path?
|
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
|
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}
|
paths = %W[#{xcrun_path}
|
||||||
#{dev_tools_path}/#{tool}
|
#{dev_tools_path}/#{tool}
|
||||||
#{xctoolchain_path}/usr/bin/#{tool}]
|
#{xctoolchain_path}/usr/bin/#{tool}]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user