From 2f57bd9c36cd54a5523422846e1843211c95fc30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Thu, 27 Apr 2023 10:45:36 +0200 Subject: Make sure Hex is installed on Mix.install/2 if user removed it --- lib/mix/lib/mix.ex | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') 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 -- cgit v1.2.1