summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Git.hs
diff options
context:
space:
mode:
authorFélix Sipma2014-11-17 20:23:30 +0100
committerJoey Hess2014-11-17 17:02:31 -0400
commitf3beea212c67bea2576e26d1147d412bdd141e9f (patch)
tree816cd14fb78f9d4c5145ea9f94c5025a47f2c951 /src/Propellor/Property/Git.hs
parent0847118cc40d81961ade914f797e206987f4a3d0 (diff)
Git: isRepo
Signed-off-by: Félix Sipma <felix.sipma@no-log.org>
Diffstat (limited to 'src/Propellor/Property/Git.hs')
-rw-r--r--src/Propellor/Property/Git.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Propellor/Property/Git.hs b/src/Propellor/Property/Git.hs
index e5df7e48..eb821597 100644
--- a/src/Propellor/Property/Git.hs
+++ b/src/Propellor/Property/Git.hs
@@ -91,3 +91,6 @@ cloned owner url dir mbranch = check originurl (property desc checkout)
-- installed here.
, Just "git update-server-info"
]
+
+isRepo :: FilePath -> IO Bool
+isRepo dir = isNothing <$> catchMaybeIO (readProcess "git" ["rev-parse", "--resolve-git-dir", dir])