From 932bd6dd932e4ffd4bf7ce03abc622d7bd79f3b7 Mon Sep 17 00:00:00 2001 From: Pablo Costas Date: Thu, 25 Jun 2020 20:16:44 +0200 Subject: [PATCH] Make local commands remove libs before unpacking --- src/rebar_prv_local_install.erl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rebar_prv_local_install.erl b/src/rebar_prv_local_install.erl index 8b0ef48f..9a278dea 100644 --- a/src/rebar_prv_local_install.erl +++ b/src/rebar_prv_local_install.erl @@ -83,6 +83,9 @@ extract_escript(State, ScriptPath) -> throw(?PRV_ERROR({non_writeable, OutputDir})) end, + ?INFO("Removing existing rebar3 libs from ~ts...", [OutputDir]), + rebar_file_utils:rm_rf(filename:join(OutputDir, "*")), + ?INFO("Extracting rebar3 libs to ~ts...", [OutputDir]), zip:extract(Archive, [{cwd, OutputDir}]),