From 8a304f7e8085c7e5519ebc5a19872c252019f806 Mon Sep 17 00:00:00 2001 From: Duncan Coutts <duncan@community.haskell.org> Date: Mon, 29 Jun 2015 03:20:56 +0100 Subject: [PATCH] Support https urls as targets in cabal install invocations e.g. cabal install https://example.com/foo-1.0.tar.gz --- cabal-install/Distribution/Client/Targets.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cabal-install/Distribution/Client/Targets.hs b/cabal-install/Distribution/Client/Targets.hs index c64e18abdd..dbc5731198 100644 --- a/cabal-install/Distribution/Client/Targets.hs +++ b/cabal-install/Distribution/Client/Targets.hs @@ -265,7 +265,7 @@ readUserTarget targetstr = uriScheme = scheme, uriAuthority = Just URIAuth { uriRegName = host } } - | scheme /= "http:" -> + | scheme /= "http:" && scheme /= "https:" -> Just (Left (UserTargetUnexpectedUriScheme targetstr)) | null host -> @@ -332,7 +332,7 @@ reportUserTargetProblems problems = do $ unlines [ "URL target not supported '" ++ name ++ "'." | name <- target ] - ++ "Only 'http://' URLs are supported." + ++ "Only 'http://' and 'https://' URLs are supported." case [ target | UserTargetUnrecognisedUri target <- problems ] of [] -> return () -- GitLab