From d408f00b4223b9c5be8a34b5e5abaf4f4ead38cd Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 17 Apr 2025 17:36:20 -1000 Subject: [PATCH] imp:setup: use HEAD instead of GET to check current version --- hledger/Hledger/Cli/Commands/Setup.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hledger/Hledger/Cli/Commands/Setup.hs b/hledger/Hledger/Cli/Commands/Setup.hs index 064f9c4c5..a8257ea5e 100644 --- a/hledger/Hledger/Cli/Commands/Setup.hs +++ b/hledger/Hledger/Cli/Commands/Setup.hs @@ -249,7 +249,7 @@ setupTags = do getLatestHledgerVersion :: IO (Either String String) getLatestHledgerVersion = do result <- try $ runReq defaultHttpConfig{httpConfigRedirectCount=0} $ - req GET (https "hackage.haskell.org" /: "package" /: "hledger" /: "docs" /: "") NoReqBody bsResponse mempty + req HEAD (https "hackage.haskell.org" /: "package" /: "hledger" /: "docs" /: "") NoReqBody bsResponse mempty case result of Right _ -> return $ Left "no redirect" Left (VanillaHttpException (HttpExceptionRequest _ (StatusCodeException rsp _))) -> do