Only check Xcode prefix when non-nil

This commit is contained in:
Jack Nagel 2014-04-21 18:52:12 -05:00
parent 24e27465e0
commit 7573855756

View File

@ -61,7 +61,7 @@ module OS
Pathname.new "/usr/bin"
elsif not (make_path = `/usr/bin/xcrun -find make 2>/dev/null`).empty?
Pathname.new(make_path.chomp).dirname
elsif File.exist? "#{Xcode.prefix}/usr/bin/make"
elsif Xcode.prefix && File.exist?("#{Xcode.prefix}/usr/bin/make")
Pathname.new "#{Xcode.prefix}/usr/bin"
end
end