Skip to content

Commit 63c98e2

Browse files
authored
Merge pull request #2695 from hommeabeil/fix-args
Do not discard parameters --system_libs and --include-erts when duplicate values exist
2 parents 81645a4 + cccbc2a commit 63c98e2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/rebar_relx.erl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,14 @@ maybe_obey_command_args(RelxConfig, Opts, Args) ->
236236
undefined ->
237237
Acc;
238238
V ->
239-
lists:keystore(Opt, 1, Acc, {Opt, V})
239+
replace_all_instance(Opt, V, Acc)
240240
end
241241
end, RelxConfig, Args).
242242

243+
replace_all_instance(Opt, Value, RelxConfig) ->
244+
lists:map(fun({K, _}) when K =:= Opt -> {K, Value};
245+
(Other) -> Other end, RelxConfig).
246+
243247
%%
244248

245249
%% Returns a map of all apps that are part of the rebar3 project.

0 commit comments

Comments
 (0)