add UrlOptions sum type
This commit is contained in:
parent
fdc7200b25
commit
003fc2b7e1
14 changed files with 78 additions and 65 deletions
|
@ -89,10 +89,10 @@ canUpgrade urgency urlrenderer d = ifM autoUpgradeEnabled
|
|||
|
||||
getDistributionInfo :: Assistant (Maybe GitAnnexDistribution)
|
||||
getDistributionInfo = do
|
||||
ua <- liftAnnex Url.getUserAgent
|
||||
uo <- liftAnnex Url.getUrlOptions
|
||||
liftIO $ withTmpFile "git-annex.tmp" $ \tmpfile h -> do
|
||||
hClose h
|
||||
ifM (Url.downloadQuiet distributionInfoUrl [] [] tmpfile ua)
|
||||
ifM (Url.downloadQuiet distributionInfoUrl tmpfile uo)
|
||||
( readish <$> readFileStrict tmpfile
|
||||
, return Nothing
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue