From 5f6822d6cd8c8663e2feda208669eb50239e1963 Mon Sep 17 00:00:00 2001 From: Phil de Joux Date: Sun, 8 Dec 2024 06:55:22 -0500 Subject: [PATCH] Trim before checking with parseURI --- cabal-install/src/Distribution/Client/ProjectConfig/Legacy.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cabal-install/src/Distribution/Client/ProjectConfig/Legacy.hs b/cabal-install/src/Distribution/Client/ProjectConfig/Legacy.hs index 49720fdd8ea..5bbcdb27b54 100644 --- a/cabal-install/src/Distribution/Client/ProjectConfig/Legacy.hs +++ b/cabal-install/src/Distribution/Client/ProjectConfig/Legacy.hs @@ -141,6 +141,7 @@ import Distribution.Utils.NubList , overNubList , toNubList ) +import Distribution.Utils.String (trim) import Distribution.Client.HttpUtils import Distribution.Client.ParseUtils @@ -342,7 +343,7 @@ parseProjectSkeleton cacheDir httpTransport verbosity projectDir source (Project fetch pci fetch :: FilePath -> IO BS.ByteString - fetch pci = case parseURI pci of + fetch pci = case parseURI $ trim pci of Just uri -> do let fp = cacheDir map (\x -> if isPathSeparator x then '_' else x) (makeValid $ show uri) createDirectoryIfMissing True cacheDir