From c8f2d302dc87fe5b680bf8ad6806d6096c34c905 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 6 Apr 2018 21:17:36 -0400 Subject: [PATCH] run curl when configured to do it at runtime, even if not available at build time --- Utility/Url.hs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Utility/Url.hs b/Utility/Url.hs index d1811e4654..fddc75c8eb 100644 --- a/Utility/Url.hs +++ b/Utility/Url.hs @@ -34,7 +34,6 @@ module Utility.Url ( import Common import Utility.Metered -import qualified BuildInfo import Network.URI import Network.HTTP.Types @@ -173,8 +172,7 @@ getUrlInfo url uo = case parseURIRelaxed url of sz <- getFileSize' f stat found (Just sz) Nothing Nothing -> dne - | BuildInfo.curl -> existscurl u - | otherwise -> dne + | otherwise -> existscurl u Nothing -> dne where dne = return $ UrlInfo False Nothing Nothing @@ -271,8 +269,7 @@ download meterupdate url file uo = go `catchNonAsync` (const $ return False) withMeteredFile src meterupdate $ L.writeFile file return True - | BuildInfo.curl -> downloadcurl - | otherwise -> return False + | otherwise -> downloadcurl Nothing -> return False downloadconduit req = catchMaybeIO (getFileSize file) >>= \case