Skip to content
Snippets Groups Projects
Commit bb7229d2 authored by Arjun Kathuria's avatar Arjun Kathuria :rocket:
Browse files

Adds descriptive comments in rmGhcupDir explaing silent deletions and

leftover reporting.
parent 708cd5ea
No related branches found
No related tags found
1 merge request!101[WIP] Feature "nuke"
...@@ -1367,6 +1367,7 @@ rmGhcupDirs = do ...@@ -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 ...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment