From f3beea212c67bea2576e26d1147d412bdd141e9f Mon Sep 17 00:00:00 2001 From: Félix Sipma Date: Mon, 17 Nov 2014 20:23:30 +0100 Subject: Git: isRepo Signed-off-by: Félix Sipma --- src/Propellor/Property/Git.hs | 3 +++ 1 file changed, 3 insertions(+) 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]) -- cgit v1.2.3