]> granicus.if.org Git - ejabberd/commitdiff
Fix detection of rebar3
authorPaweł Chmielowski <pchmielowski@process-one.net>
Fri, 12 Jan 2018 16:12:46 +0000 (17:12 +0100)
committerPaweł Chmielowski <pchmielowski@process-one.net>
Fri, 12 Jan 2018 16:12:46 +0000 (17:12 +0100)
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

rebar.config.script

index 470b791e9e8f967a286586d7e5a10fe5e2c959b3..c69acc794697a406ae41f5a655c60ce94e903fd8 100644 (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())