Skip to content

Commit

Permalink
Merge pull request #43 from uwiger/uw-rebar3-bare-check
Browse files Browse the repository at this point in the history
rebar.config.script checks for rebar3 bare
  • Loading branch information
uwiger authored Sep 15, 2017
2 parents 0b695ac + 3ef3b34 commit 9b9d215
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rebar.config.script
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
%% -*- erlang -*-
%%
IsRebar3Bare = (nomatch =/= re:run(init:get_plain_arguments(), "rebar3bare")).

CONFIG1 =
case os:getenv("TGT") of
false ->
Expand All @@ -23,7 +25,8 @@ case os:getenv("TGT") of
C1
end.

case erlang:function_exported(rebar3, main, 1) of
%% It seems `rebar3 bare compile` (mix) fails if the following subst is made.
case erlang:function_exported(rebar3, main, 1) andalso (not IsRebar3Bare) of
true ->
lists:keydelete(post_hooks, 1, CONFIG1)
++ [{provider_hooks, [{post, [{compile, escriptize}]}]}];
Expand Down

0 comments on commit 9b9d215

Please sign in to comment.