Skip to content

Commit

Permalink
use copied erts dir when tar'ing even when the user sets the erts
Browse files Browse the repository at this point in the history
  • Loading branch information
tsloughter committed Sep 2, 2021
1 parent 1cc1a9d commit da35b14
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/rlx_tar.erl
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,21 @@ make_tar_opts(ExtraFiles, Release, OutputDir, State) ->

maybe_include_erts(_ExtraFiles, Release, OutputDir, State) ->
case rlx_state:include_erts(State) of
true ->
false ->
[];
IncludeErts ->
ErtsVersion = rlx_release:erts(Release),
ErtsDir = filename:join([OutputDir, "erts-" ++ ErtsVersion]),
case filelib:is_dir(ErtsDir) of
true ->
%% systools:make_tar looks for directory erts-vsn in
%% the dir passed to `erts'
[{erts, OutputDir}];
false when IncludeErts =:= true ->
[{erts, code:root_dir()}];
false ->
[{erts, code:root_dir()}]
end;
false ->
[];
ErtsDir ->
[{erts, ErtsDir}]
[{erts, IncludeErts}]
end
end.

maybe_extra_files(ExtraFiles, _Release, _OutputDir, State) ->
Expand Down

0 comments on commit da35b14

Please sign in to comment.