MacOS.dev_tools_path: return nil if not found

This matches the semantics of other path methods, such as Xcode.prefix.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
Jack Nagel 2012-08-17 23:21:35 -05:00
parent 3f9e88ae69
commit f471c3e99f
2 changed files with 2 additions and 3 deletions

View File

@ -99,5 +99,5 @@ ORIGINAL_PATHS = ENV['PATH'].split(':').map{ |p| Pathname.new(File.expand_path(p
# Xcode-only installs place tools in non-standard locations, and we also want # Xcode-only installs place tools in non-standard locations, and we also want
# to ensure the dev tools are in the PATH in build.rb # to ensure the dev tools are in the PATH in build.rb
unless ORIGINAL_PATHS.include? MacOS.dev_tools_path unless ORIGINAL_PATHS.include? MacOS.dev_tools_path
ENV['PATH'] = ENV['PATH'].to_s + ':' + MacOS.dev_tools_path ENV['PATH'] = ENV['PATH'].to_s + ':' + MacOS.dev_tools_path.to_s
end end

View File

@ -71,8 +71,7 @@ module MacOS extend self
else else
# Since we are pretty unrelenting in finding Xcode no matter where # Since we are pretty unrelenting in finding Xcode no matter where
# it hides, we can now throw in the towel. # it hides, we can now throw in the towel.
opoo "You really should consult the `brew doctor`!" opoo "Could not locate developer tools. Consult `brew doctor`."
""
end end
end end