diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_opts.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rebar_opts.erl b/src/rebar_opts.erl index 8863b4c..b7156b2 100644 --- a/src/rebar_opts.erl +++ b/src/rebar_opts.erl @@ -132,7 +132,11 @@ merge_opt(mib_first_files, Value, Value) -> merge_opt(mib_first_files, NewValue, OldValue) -> OldValue ++ NewValue; merge_opt(relx, NewValue, OldValue) -> - rebar_utils:tup_umerge(OldValue, NewValue); + Partition = fun(C) -> is_tuple(C) andalso element(1, C) =:= overlay end, + {NewOverlays, NewOther} = lists:partition(Partition, NewValue), + {OldOverlays, OldOther} = lists:partition(Partition, OldValue), + rebar_utils:tup_umerge(NewOverlays, OldOverlays) + ++ rebar_utils:tup_umerge(OldOther, NewOther); merge_opt(Key, NewValue, OldValue) when Key == erl_opts; Key == eunit_compile_opts; Key == ct_compile_opts -> merge_erl_opts(lists:reverse(OldValue), NewValue); |