summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnthony Molinaro <anthonym@alumni.caltech.edu>2017-06-01 18:32:30 +0000
committerAnthony Molinaro <anthonym@alumni.caltech.edu>2017-06-01 18:32:30 +0000
commit249b5f13eb8f1859d7a70ab316bc7541543aaf57 (patch)
tree083ca6d22bc7c39242fd6e0efa59ef38794024bd /src
parent87e756d8dc30270a90d0fc12186bc4b14c1543a5 (diff)
Avoid reversing relx overlays.
This mostly moves a lists:reverse/1 which ensures that profile overlays are run first but keeps the order of overlays otherwise.
Diffstat (limited to 'src')
-rw-r--r--src/rebar_relx.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rebar_relx.erl b/src/rebar_relx.erl
index abfb8fc..17c0bd6 100644
--- a/src/rebar_relx.erl
+++ b/src/rebar_relx.erl
@@ -6,6 +6,10 @@
-export([do/4,
format_error/1]).
+-ifdef(TEST).
+-export([merge_overlays/1]).
+-endif.
+
-include("rebar.hrl").
%% ===================================================================
@@ -64,5 +68,5 @@ merge_overlays(Config) ->
(_) -> false
end, Config),
%% Have profile overlay entries come before others to match how profiles work elsewhere
- NewOverlay = lists:reverse(lists:flatmap(fun({overlay, Overlay}) -> Overlay end, Overlays)),
+ NewOverlay = lists:flatmap(fun({overlay, Overlay}) -> Overlay end, lists:reverse(Overlays)),
[{overlay, NewOverlay} | Others].