Skip to content

Commit

Permalink
Merge pull request #884 from tsloughter/use-copied-erts
Browse files Browse the repository at this point in the history
use copied erts dir when tar'ing even when the user sets the erts
  • Loading branch information
tsloughter authored Sep 2, 2021
2 parents 1cc1a9d + da35b14 commit 5587173
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 5587173

Please sign in to comment.