diff options
author | Joey Hess <joey@kitenet.net> | 2014-02-24 21:29:37 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-02-24 21:29:37 -0400 |
commit | b6fb2e3a3384d2b9a92002aaf26c0c0d535ee4d3 (patch) | |
tree | 9dca4e7d6168983ebc0497672c4bdf6de7a82f31 /Config.hs | |
parent | d2ff4e12d0ae0d32263e258ea7c2a283d1d92149 (diff) |
Make annex.web-options be used in several places that call curl.
Diffstat (limited to 'Config.hs')
-rw-r--r-- | Config.hs | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -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 |