diff options
author | Jason L. Shiffer <[email protected]> | 2013-04-10 08:55:32 -0300 |
---|---|---|
committer | Jason L. Shiffer <[email protected]> | 2013-04-10 08:55:32 -0300 |
commit | a28e7130b8ced84cd831c9e96bcbe1fb9b3c6d8f (patch) | |
tree | 706c85412b1604e06df2920ba1c05ff84cd58b03 /src | |
parent | 36de196be67e66a7de44cc103babd20acf8548c4 (diff) | |
download | relx-a28e7130b8ced84cd831c9e96bcbe1fb9b3c6d8f.tar.gz relx-a28e7130b8ced84cd831c9e96bcbe1fb9b3c6d8f.tar.bz2 relx-a28e7130b8ced84cd831c9e96bcbe1fb9b3c6d8f.zip |
Remove bin/erl before replacing it
In some erlang distributions (e.g. brew) the ERTS files do not have
write permissions set. When this is the case the file:write_file will
fail with error 'eacces'.
This commit removes 'bin/erl' before attempting to write the new file.
Diffstat (limited to 'src')
-rw-r--r-- | src/rcl_prv_assembler.erl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rcl_prv_assembler.erl b/src/rcl_prv_assembler.erl index 90a6b72..f40bdc5 100644 --- a/src/rcl_prv_assembler.erl +++ b/src/rcl_prv_assembler.erl @@ -291,6 +291,7 @@ include_erts(State, Release, OutputDir, RelDir) -> true -> ok = ec_file:mkdir_p(LocalErts), ok = ec_file:copy(ErtsDir, LocalErts, [recursive]), + ok = ec_file:remove(filename:join([LocalErts, "bin", "erl"])), ok = file:write_file(filename:join([LocalErts, "bin", "erl"]), erl_script(ErtsVersion)), case rcl_state:get(State, extended_start_script, false) of true -> |