Skip to content

Commit

Permalink
Merge pull request #926 from eproxus/eproxus/optional_dyn_erl
Browse files Browse the repository at this point in the history
Only overwrite erl with dyn_erl if dyn_erl exists
  • Loading branch information
ferd authored Sep 1, 2022
2 parents b5182ce + fac4a2b commit fc931c4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/rlx_assemble.erl
Original file line number Diff line number Diff line change
Expand Up @@ -667,8 +667,13 @@ include_erts(State, Release, OutputDir, RelDir) ->
unix ->
DynErl = filename:join([LocalErtsBin, "dyn_erl"]),
Erl = filename:join([LocalErtsBin, "erl"]),
ok = rlx_file_utils:ensure_writable(Erl),
rlx_file_utils:copy(DynErl, Erl);
case filelib:is_regular(DynErl) of
true ->
ok = rlx_file_utils:ensure_writable(Erl),
rlx_file_utils:copy(DynErl, Erl);
false ->
ok
end;
win32 ->
ok
end,
Expand Down

0 comments on commit fc931c4

Please sign in to comment.