Adds descriptive comments in rmGhcupDir explaing silent deletions and
leftover reporting.
This commit is contained in:
parent
708cd5ead9
commit
bb7229d224
@ -1367,6 +1367,7 @@ rmGhcupDirs = do
|
|||||||
-- remove bin directory conditionally
|
-- remove bin directory conditionally
|
||||||
rmBinDir binDir
|
rmBinDir binDir
|
||||||
|
|
||||||
|
-- report files in baseDir that are left-over after the standard location deletions above
|
||||||
reportRemainingFiles baseDir
|
reportRemainingFiles baseDir
|
||||||
|
|
||||||
where
|
where
|
||||||
@ -1405,6 +1406,9 @@ rmGhcupDirs = do
|
|||||||
remainingFiles <- liftIO $ getDirectoryContentsRecursive ghcupDir
|
remainingFiles <- liftIO $ getDirectoryContentsRecursive ghcupDir
|
||||||
pure remainingFiles
|
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
|
deleteFile filepath = do
|
||||||
hideError InappropriateType $ rmFile filepath
|
hideError InappropriateType $ rmFile filepath
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user