Merge pull request #3941 from bukzor/curl-crash
fix: crash when curl is not installed
This commit is contained in:
commit
42445dab9c
@ -6,8 +6,8 @@ def curl_executable
|
|||||||
ENV["HOMEBREW_CURL"],
|
ENV["HOMEBREW_CURL"],
|
||||||
which("curl"),
|
which("curl"),
|
||||||
"/usr/bin/curl",
|
"/usr/bin/curl",
|
||||||
].map { |c| Pathname(c) }.find(&:executable?)
|
].compact.map { |c| Pathname(c) }.find(&:executable?)
|
||||||
raise "curl is not executable" unless @curl
|
raise "no executable curl was found" unless @curl
|
||||||
@curl
|
@curl
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user