From 09d72e7c974f3d5c8307699ffa24bb81ef084f74 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Mon, 17 Jul 2023 23:11:59 +0800 Subject: [PATCH] Don't error on non-empty dirs during cleanup --- lib/GHCup/GHC.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/GHCup/GHC.hs b/lib/GHCup/GHC.hs index 4ad4d0c..7b3fb70 100644 --- a/lib/GHCup/GHC.hs +++ b/lib/GHCup/GHC.hs @@ -731,7 +731,7 @@ rmGHCVer ver = do Just files -> do lift $ logInfo $ "Removing files safely from: " <> T.pack dir forM_ files (lift . hideError NoSuchThing . recycleFile . (\f -> dir dropDrive f)) - removeEmptyDirsRecursive dir + hideError UnsatisfiedConstraints $ removeEmptyDirsRecursive dir survivors <- liftIO $ hideErrorDef [doesNotExistErrorType] [] $ listDirectory dir f <- recordedInstallationFile GHC ver lift $ recycleFile f