diff options
Diffstat (limited to 'Annex/Url.hs')
-rw-r--r-- | Annex/Url.hs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Annex/Url.hs b/Annex/Url.hs index b787ee78c..f12408a08 100644 --- a/Annex/Url.hs +++ b/Annex/Url.hs @@ -31,11 +31,9 @@ getUrlOptions = mkUrlOptions <*> headers <*> options where - headers = do - v <- annexHttpHeadersCommand <$> Annex.getGitConfig - case v of - Just cmd -> lines <$> liftIO (readProcess "sh" ["-c", cmd]) - Nothing -> annexHttpHeaders <$> Annex.getGitConfig + headers = annexHttpHeadersCommand <$> Annex.getGitConfig >>= \case + Just cmd -> lines <$> liftIO (readProcess "sh" ["-c", cmd]) + Nothing -> annexHttpHeaders <$> Annex.getGitConfig options = map Param . annexWebOptions <$> Annex.getGitConfig withUrlOptions :: (U.UrlOptions -> IO a) -> Annex a |