Make annex.web-options be used in several places that call curl.
This commit is contained in:
parent
46cc39f1a4
commit
c69d6eb035
9 changed files with 39 additions and 36 deletions
17
Config.hs
17
Config.hs
|
@ -80,10 +80,13 @@ setCrippledFileSystem b = do
|
|||
setConfig (annexConfig "crippledfilesystem") (Git.Config.boolConfig b)
|
||||
Annex.changeGitConfig $ \c -> c { annexCrippledFileSystem = b }
|
||||
|
||||
{- Gets the http headers to use. -}
|
||||
getHttpHeaders :: Annex [String]
|
||||
getHttpHeaders = do
|
||||
v <- annexHttpHeadersCommand <$> Annex.getGitConfig
|
||||
case v of
|
||||
Just cmd -> lines <$> liftIO (readProcess "sh" ["-c", cmd])
|
||||
Nothing -> annexHttpHeaders <$> Annex.getGitConfig
|
||||
{- Gets the http headers to use, and any configured command-line options. -}
|
||||
getHttpHeadersOptions :: Annex ([String], [CommandParam])
|
||||
getHttpHeadersOptions = (,) <$> headers <*> options
|
||||
where
|
||||
headers = do
|
||||
v <- annexHttpHeadersCommand <$> Annex.getGitConfig
|
||||
case v of
|
||||
Just cmd -> lines <$> liftIO (readProcess "sh" ["-c", cmd])
|
||||
Nothing -> annexHttpHeaders <$> Annex.getGitConfig
|
||||
options = map Param . annexWebOptions <$> Annex.getGitConfig
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue