From 8bd9f68fc87452a7e20b322e327d2a93d73065f1 Mon Sep 17 00:00:00 2001
From: Gershom Bazerman <gershom@arista.com>
Date: Tue, 14 Feb 2023 20:47:45 -0500
Subject: [PATCH] don't auto-download in hash validation phase

---
 cabal-install/src/Distribution/Client/FetchUtils.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cabal-install/src/Distribution/Client/FetchUtils.hs b/cabal-install/src/Distribution/Client/FetchUtils.hs
index f14ef418bd..0a493d493f 100644
--- a/cabal-install/src/Distribution/Client/FetchUtils.hs
+++ b/cabal-install/src/Distribution/Client/FetchUtils.hs
@@ -134,7 +134,7 @@ verifyFetchedTarball verbosity repoCtxt repo pkgid =
    in handleError $ do
         exists <- doesFileExist file
         if not exists
-          then return False
+          then return True -- if the file does not exist, it vacuously passes validation, since it will be downloaded as necessary with what we will then check is a valid hash.
           else case repo of
             -- a secure repo has hashes we can compare against to confirm this is the correct file.
                 RepoSecure{} ->
-- 
GitLab