Avoid running annex.http-headers-command more than once.

This commit is contained in:
Joey Hess 2018-04-04 15:00:51 -04:00
parent 98cc34c211
commit 2ec07bc29f
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
11 changed files with 31 additions and 28 deletions

View file

@ -316,8 +316,7 @@ usingDistribution :: IO Bool
usingDistribution = isJust <$> getEnv "GIT_ANNEX_STANDLONE_ENV"
downloadDistributionInfo :: Assistant (Maybe GitAnnexDistribution)
downloadDistributionInfo = do
uo <- liftAnnex Url.getUrlOptions
downloadDistributionInfo = Url.withUrlOptions $ \uo -> do
gpgcmd <- liftAnnex $ gpgCmd <$> Annex.getGitConfig
liftIO $ withTmpDir "git-annex.tmp" $ \tmpdir -> do
let infof = tmpdir </> "info"