diff --git a/src/rebar_relx.erl b/src/rebar_relx.erl index c457b22d1..913fcb573 100644 --- a/src/rebar_relx.erl +++ b/src/rebar_relx.erl @@ -236,10 +236,14 @@ maybe_obey_command_args(RelxConfig, Opts, Args) -> undefined -> Acc; V -> - lists:keystore(Opt, 1, Acc, {Opt, V}) + replace_all_instance(Opt, V, Acc) end end, RelxConfig, Args). +replace_all_instance(Opt, Value, RelxConfig) -> + lists:map(fun({K, _}) when K =:= Opt -> {K, Value}; + (Other) -> Other end, RelxConfig). + %% %% Returns a map of all apps that are part of the rebar3 project.