diff --git a/Library/Homebrew/os/mac.rb b/Library/Homebrew/os/mac.rb index ff7fd0c0a1..64b0878efb 100644 --- a/Library/Homebrew/os/mac.rb +++ b/Library/Homebrew/os/mac.rb @@ -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