elixir: fix always installing erlang19 even if 18 is installed

https://github.com/Homebrew/homebrew-core/issues/10603
This commit is contained in:
Elliott Hilaire 2017-03-10 18:20:46 +00:00 committed by ilovezfs
parent d783c53691
commit a1709704e6

View file

@ -6,7 +6,7 @@ class Erlang18Requirement < Requirement
erl = which("erl")
next unless erl
`#{erl} -noshell -eval 'io:fwrite("~s", [erlang:system_info(otp_release) >= "18"])' -s erlang halt | grep -q '^true'`
$?.exitstatus.zero?
$?.exitstatus.zero? ? erl : false
end
def message; <<-EOS.undent