summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@dashbit.co>2023-04-27 10:45:36 +0200
committerJosé Valim <jose.valim@dashbit.co>2023-04-27 10:45:36 +0200
commit2f57bd9c36cd54a5523422846e1843211c95fc30 (patch)
treee64a13b5b3d8afed45daa4142593e5da694048a2
parent0470bb6641cd408cbed14679d648dca7eeec2665 (diff)
downloadelixir-2f57bd9c36cd54a5523422846e1843211c95fc30.tar.gz
Make sure Hex is installed on Mix.install/2 if user removed it
-rw-r--r--lib/mix/lib/mix.ex3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/mix/lib/mix.ex b/lib/mix/lib/mix.ex
index ae8c6c44b..26f4c663f 100644
--- a/lib/mix/lib/mix.ex
+++ b/lib/mix/lib/mix.ex
@@ -856,6 +856,9 @@ defmodule Mix do
Mix.Task.rerun("deps.get")
true ->
+ # We already have a cache. If the user by any chance uninstalled Hex,
+ # we make sure it is installed back (which mix deps.get would do anyway)
+ Mix.Hex.ensure_installed?(true)
:ok
end