Commit 4a98df20 authored by Michael Hanus's avatar Michael Hanus
Browse files

CPM updated

parent 5184a878
...@@ -183,8 +183,7 @@ updateRepository cfg = do ...@@ -183,8 +183,7 @@ updateRepository cfg = do
gitExists <- doesDirectoryExist $ (repositoryDir cfg) </> ".git" gitExists <- doesDirectoryExist $ (repositoryDir cfg) </> ".git"
if gitExists if gitExists
then do then do
c <- inDirectory (repositoryDir cfg) $ c <- inDirectory (repositoryDir cfg) $ execQuietCmd $ cleanPullCmd
execQuietCmd $ (\q -> "git pull " ++ q ++ " origin master")
if c == 0 if c == 0
then do updateRepositoryCache cfg then do updateRepositoryCache cfg
log Info "Successfully updated repository" log Info "Successfully updated repository"
...@@ -196,6 +195,7 @@ updateRepository cfg = do ...@@ -196,6 +195,7 @@ updateRepository cfg = do
log Info "Successfully updated repository" log Info "Successfully updated repository"
else failIO $ "Failed to update git repository, return code " ++ show c else failIO $ "Failed to update git repository, return code " ++ show c
where where
cleanPullCmd q = "git clean -d -f && git pull " ++ q ++ " origin master"
cloneCommand q = unwords ["git clone", q, packageIndexRepository cfg, "."] cloneCommand q = unwords ["git clone", q, packageIndexRepository cfg, "."]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment