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

adds bin dir removal code, checking for XDG

parent 3fae516c
No related branches found
No related tags found
1 merge request!101[WIP] Feature "nuke"
......@@ -1341,6 +1341,9 @@ rmGhcupDirs = do
-- remove entire logs Dir
rmLogsDir logsDir
-- remove bin directory conditionally
rmBinDir binDir
liftIO $ print dirs
where
......@@ -1365,6 +1368,16 @@ rmGhcupDirs = do
forM_ contents deleteFile
removeDirIfEmpty logsDir
rmBinDir binDir = do
#if !defined(IS_WINDOWS)
isXDGStyle <- useXDG
if not isXDGStyle
then removeDirIfEmpty binDir
else pure ()
#else
removeDirIfEmpty binDir
#endif
deleteFile filepath = do
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