From 249b5f13eb8f1859d7a70ab316bc7541543aaf57 Mon Sep 17 00:00:00 2001 From: Anthony Molinaro Date: Thu, 1 Jun 2017 18:32:30 +0000 Subject: 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. --- src/rebar_relx.erl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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]. -- cgit v1.1