summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Upgrade/V2.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/Upgrade/V2.hs b/Upgrade/V2.hs
index 14e328edb..4824f4bba 100644
--- a/Upgrade/V2.hs
+++ b/Upgrade/V2.hs
@@ -54,11 +54,13 @@ upgrade = do
when e $ do
mapM_ (\(k, f) -> inject f $ logFile k) =<< locationLogs g
mapM_ (\f -> inject f f) =<< logFiles (olddir g)
- liftIO $ do
- Git.run g "rm" [Param "-r", Param "-f", Param "-q", File (olddir g)]
- unless bare $ gitAttributesUnWrite g
saveState
+
+ when e $ liftIO $ do
+ Git.run g "rm" [Param "-r", Param "-f", Param "-q", File (olddir g)]
+ unless bare $ gitAttributesUnWrite g
+
unless bare $ push
return True