aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLuis Rascão <[email protected]>2016-10-18 13:37:38 +0100
committerGitHub <[email protected]>2016-10-18 13:37:38 +0100
commit53a87edc5285042355b545075440985dd3037bc6 (patch)
tree4f0f2f1f27cfe005e73d26688f324f072eb4e439 /src
parentd99e527eac918243e4ff3523991c7cd56a5bf1b6 (diff)
parentd271be00dda31249744c00db0458957f7c13c676 (diff)
downloadrelx-53a87edc5285042355b545075440985dd3037bc6.tar.gz
relx-53a87edc5285042355b545075440985dd3037bc6.tar.bz2
relx-53a87edc5285042355b545075440985dd3037bc6.zip
Merge pull request #525 from cybernetlab/master
Fixed: #524. Erts src folder existence check added
Diffstat (limited to 'src')
-rw-r--r--src/rlx_prv_assembler.erl8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/rlx_prv_assembler.erl b/src/rlx_prv_assembler.erl
index 1f64886..030a9b3 100644
--- a/src/rlx_prv_assembler.erl
+++ b/src/rlx_prv_assembler.erl
@@ -507,7 +507,11 @@ include_erts(State, Release, OutputDir, RelDir) ->
true -> ok;
false ->
SrcDir = filename:join([LocalErts, "src"]),
- ok = ec_file:remove(SrcDir, [recursive])
+ %% ensure the src folder exists before deletion
+ case ec_file:exists(SrcDir) of
+ true -> ok = ec_file:remove(SrcDir, [recursive]);
+ false -> ok
+ end
end,
case rlx_state:get(State, extended_start_script, false) of
@@ -567,7 +571,7 @@ make_boot_script_variables(State) ->
% (dictated by erl.ini [erlang] Rootdir=) and so a boot variable is made
% pointing to the release directory
% On non-Windows, $ROOT is set by the ROOTDIR environment variable as the
- % release directory, so a boot variable is made pointing to the erts
+ % release directory, so a boot variable is made pointing to the erts
% directory.
% NOTE the boot variable can point to either the release/erts root directory
% or the release/erts lib directory, as long as the usage here matches the