Skip to content
Snippets Groups Projects
Commit 2f052a2f authored by Jack Nagel's avatar Jack Nagel
Browse files

Remove another unnecessary check

parent 490cb348
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,7 @@ module OS
# If it's not there, or xcode-select is misconfigured, we have to
# 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?
xcrun_path = begin
path = `/usr/bin/xcrun -find #{tool} 2>/dev/null`.chomp
# If xcrun finds a superenv tool then discard the result.
path unless path.include?("Library/ENV")
......@@ -60,7 +60,7 @@ module OS
elsif tools_in_prefix? "/"
# probably a safe enough assumption (the unix way)
Pathname.new "/usr/bin"
elsif not Xcode.bad_xcode_select_path? and not `/usr/bin/xcrun -find make 2>/dev/null`.empty?
elsif not `/usr/bin/xcrun -find make 2>/dev/null`.empty?
# Note that the exit status of system "xcrun foo" isn't always accurate
# Wherever "make" is there are the dev tools.
Pathname.new(`/usr/bin/xcrun -find make`.chomp).dirname
......@@ -88,7 +88,7 @@ module OS
(@sdk_path ||= {}).fetch(v.to_s) do |key|
opts = []
# First query Xcode itself
opts << `#{locate('xcodebuild')} -version -sdk macosx#{v} Path 2>/dev/null`.chomp unless Xcode.bad_xcode_select_path?
opts << `#{locate('xcodebuild')} -version -sdk macosx#{v} Path 2>/dev/null`.chomp
# Xcode.prefix is pretty smart, so lets look inside to find the sdk
opts << "#{Xcode.prefix}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX#{v}.sdk"
# Xcode < 4.3 style
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment