diff options
| author | Joey Hess <joey@kitenet.net> | 2014-04-13 14:12:11 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-04-13 14:12:11 -0400 |
| commit | 2e128c8fe25fb92ecfbd0bbe79ea777d53fa11ca (patch) | |
| tree | 8a1b6e3bbbcf8a84e1edf282ee393f9b38e5c3d5 /Propellor/Property/Git.hs | |
| parent | 4dac4eea222c5fa8a0cfcb5a4959dd3832a86188 (diff) | |
propellor spin
Diffstat (limited to 'Propellor/Property/Git.hs')
| -rw-r--r-- | Propellor/Property/Git.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Propellor/Property/Git.hs b/Propellor/Property/Git.hs index 6541dc74..431f4134 100644 --- a/Propellor/Property/Git.hs +++ b/Propellor/Property/Git.hs @@ -75,8 +75,10 @@ cloned owner url dir mbranch = check originurl (Property desc checkout) , return True ) checkout = do - liftIO $ whenM (doesDirectoryExist dir) $ - removeDirectoryRecursive dir + liftIO $ do + whenM (doesDirectoryExist dir) $ + removeDirectoryRecursive dir + createDirectoryIfMissing True (takeDirectory dir) ensureProperty $ userScriptProperty owner $ catMaybes [ Just $ "git clone " ++ shellEscape url ++ " " ++ shellEscape dir , Just $ "cd " ++ shellEscape dir |
