From: Paweł Chmielowski Date: Fri, 12 Jan 2018 16:12:46 +0000 (+0100) Subject: Fix detection of rebar3 X-Git-Tag: 18.03~144 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e1da673502975fcfbc84da66bfd4463d20acd4af;p=ejabberd Fix detection of rebar3 Looks like sometimes rebar3 report version that can't be split to 3 fields by '.', we need only first one so don't match the rest --- diff --git a/rebar.config.script b/rebar.config.script index 470b791e9..c69acc794 100644 --- a/rebar.config.script +++ b/rebar.config.script @@ -69,7 +69,7 @@ FilterConfig = fun(F, Cfg, [{Path, true, ModFun, Default} | Tail]) -> IsRebar3 = case application:get_key(rebar, vsn) of {ok, VSN} -> [VSN1 | _] = string:tokens(VSN, "-"), - [Maj, _Min, _Patch] = string:tokens(VSN1, "."), + [Maj|_] = string:tokens(VSN1, "."), (list_to_integer(Maj) >= 3); undefined -> lists:keymember(mix, 1, application:loaded_applications())