diff options
author | Fernando Tapia Rico <fertapric@gmail.com> | 2019-02-11 11:45:59 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2019-02-11 11:45:59 +0100 |
commit | 17c19eaf892b5e367a72587ae66edbf469343533 (patch) | |
tree | dfc8ab8c9ba164deb1d53bd4d9465f78ab6d34c2 /lib | |
parent | a6120c459c0e5c805fd22bb3c7b7d391ffab6217 (diff) | |
download | elixir-17c19eaf892b5e367a72587ae66edbf469343533.tar.gz |
Do not overwrite existent ERTS files in release (#8787)
Releases can include the Erlang Runtime System (ERTS), copying
it by default from the ERTS installation of the machine. If
the ERTS files were previously copied, the files are overwritten.
However, some package managers install ERTS files without writing
permissions, and once those files are copied they cannot be
overwritten.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mix/lib/mix/release.ex | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mix/lib/mix/release.ex b/lib/mix/lib/mix/release.ex index 8c50af911..bbc0d46e1 100644 --- a/lib/mix/lib/mix/release.ex +++ b/lib/mix/lib/mix/release.ex @@ -452,7 +452,7 @@ defmodule Mix.Release do def copy_erts(release) do destination = Path.join(release.path, "erts-#{release.erts_version}") File.mkdir_p!(destination) - File.cp_r!(release.erts_source, destination) + File.cp_r!(release.erts_source, destination, fn _, _ -> false end) _ = File.rm(Path.join(destination, "bin/erl")) _ = File.rm(Path.join(destination, "bin/erl.ini")) |