summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Propellor/Git.hs9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/Propellor/Git.hs b/src/Propellor/Git.hs
index e11528fa..a2f5aef2 100644
--- a/src/Propellor/Git.hs
+++ b/src/Propellor/Git.hs
@@ -51,16 +51,9 @@ getGitConfigBool key = do
_ -> False
getRepoUrl :: IO (Maybe String)
-getRepoUrl = getM get urls
+getRepoUrl = getM getGitConfigValue urls
where
urls = ["remote.deploy.url", "remote.origin.url"]
- get u = do
- v <- catchMaybeIO $
- takeWhile (/= '\n')
- <$> readProcess "git" ["config", u]
- return $ case v of
- Just url | not (null url) -> Just url
- _ -> Nothing
hasOrigin :: IO Bool
hasOrigin = catchDefaultIO False $ do