From 4f1aefb1ee78c09541f744d70b6721773bd58596 Mon Sep 17 00:00:00 2001 From: Mike Morearty Date: Thu, 13 Jun 2013 00:59:13 -0700 Subject: Elixir: Show warning if Erlang R16 isn't installed Closes #20459. Signed-off-by: Adam Vandenberg --- Library/Formula/elixir.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Library/Formula') diff --git a/Library/Formula/elixir.rb b/Library/Formula/elixir.rb index beb1ad8f8..dfdf19a8f 100644 --- a/Library/Formula/elixir.rb +++ b/Library/Formula/elixir.rb @@ -3,7 +3,12 @@ require 'formula' class ErlangInstalled < Requirement fatal true - satisfy { which 'erl' } + satisfy { + which 'erl' and begin + `erl -noshell -eval 'io:fwrite("~s~n", [erlang:system_info(otp_release)]).' -s erlang halt | grep -q '^R1[6789]'` + $?.exitstatus == 0 + end + } def message; <<-EOS.undent Erlang R16 is required to install. -- cgit v1.2.3