fix: crash when curl is not installed

This commit is contained in:
Buck Evan 2018-03-17 16:46:44 -07:00 committed by Buck Evan (bukzor)
parent 63e8817950
commit a2646a8694

View File

@ -6,8 +6,8 @@ def curl_executable
ENV["HOMEBREW_CURL"],
which("curl"),
"/usr/bin/curl",
].map { |c| Pathname(c) }.find(&:executable?)
raise "curl is not executable" unless @curl
].compact.map { |c| Pathname(c) }.find(&:executable?)
raise "no executable curl was found" unless @curl
@curl
end