From bb7229d22456a67438a9cc8fb4370ff0d4269185 Mon Sep 17 00:00:00 2001 From: Arjun Kathuria Date: Sat, 26 Jun 2021 22:09:32 +0530 Subject: [PATCH] Adds descriptive comments in rmGhcupDir explaing silent deletions and leftover reporting. --- lib/GHCup.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/GHCup.hs b/lib/GHCup.hs index a667b3c..80f7a64 100644 --- a/lib/GHCup.hs +++ b/lib/GHCup.hs @@ -1367,6 +1367,7 @@ rmGhcupDirs = do -- remove bin directory conditionally rmBinDir binDir + -- report files in baseDir that are left-over after the standard location deletions above reportRemainingFiles baseDir where @@ -1405,6 +1406,9 @@ rmGhcupDirs = do remainingFiles <- liftIO $ getDirectoryContentsRecursive ghcupDir pure remainingFiles + -- we expect only files inside cache/log dir + -- we report remaining files/dirs later, + -- hence the force/quiet mode in these delete functions below. deleteFile filepath = do hideError InappropriateType $ rmFile filepath