From b84eed36342b932b0cd0b7f0dfca4e7fcd8f4d3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eric=20Meadows-J=C3=B6nsson?= Date: Wed, 2 Dec 2015 22:42:25 +0100 Subject: [PATCH] Support non rebar tools evaluating script --- rebar.config.script | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/rebar.config.script b/rebar.config.script index de2e595..238ae2d 100644 --- a/rebar.config.script +++ b/rebar.config.script @@ -1,8 +1,11 @@ -{ok, VSN} = application:get_key(rebar, vsn), -[VSN1 | _] = string:tokens(VSN, "-"), -[Maj, Min, Patch] = string:tokens(VSN1, "."), -IsRebar3 = (list_to_integer(Maj) >= 3), - +IsRebar3 = case application:get_key(rebar, vsn) of + {ok, VSN} -> + [VSN1 | _] = string:tokens(VSN, "-"), + [Maj, Min, Patch] = string:tokens(VSN1, "."), + (list_to_integer(Maj) >= 3); + undefined -> + false + end, Rebar2Deps = [ {cf, ".*", {git, "https://github.com/project-fifo/cf", {tag, "0.2.0"}}}