aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexey Ovchinnikov <[email protected]>2016-10-18 14:22:04 +0300
committerAlexey Ovchinnikov <[email protected]>2016-10-18 14:22:04 +0300
commitd271be00dda31249744c00db0458957f7c13c676 (patch)
tree4f0f2f1f27cfe005e73d26688f324f072eb4e439 /src
parentd99e527eac918243e4ff3523991c7cd56a5bf1b6 (diff)
downloadrelx-d271be00dda31249744c00db0458957f7c13c676.tar.gz
relx-d271be00dda31249744c00db0458957f7c13c676.tar.bz2
relx-d271be00dda31249744c00db0458957f7c13c676.zip
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