From 4d058d1616905f7cf7630f6b821f51afc40e724f Mon Sep 17 00:00:00 2001 From: alisdair sullivan Date: Wed, 16 Apr 2014 00:06:45 +0000 Subject: [PATCH] add a check for env var to optionally compile without support for erlang maps --- rebar.config.script | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rebar.config.script b/rebar.config.script index 02efadf..8e9493f 100644 --- a/rebar.config.script +++ b/rebar.config.script @@ -1,6 +1,6 @@ application:start(compiler), -case {erlang:system_info(version), application:get_key(compiler, vsn)} of - {X, {ok, Y}} when X >= "6.0" andalso Y >= "5.0" -> +case {erlang:system_info(version), application:get_key(compiler, vsn), os:getenv("JSX_NO_MAPS")} of + {X, {ok, Y}, false} when X >= "6.0" andalso Y >= "5.0" -> CONFIG ++ [{erl_opts, [{d, release_supports_maps}]}]; _ -> CONFIG end. \ No newline at end of file