25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

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
This commit is contained in:
Paweł Chmielowski 2018-01-12 17:12:46 +01:00
parent 7d58b7a100
commit e1da673502

View File

@ -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())