Adds using 'rmFile' fn in rmGhcupDirs, it has better windows handling logic

This commit is contained in:
Arjun Kathuria 2021-06-24 10:08:12 +05:30
parent 33eaa765d7
commit 3fae516ce4

View File

@ -1314,7 +1314,8 @@ rmTool ListResult {lVer, lTool, lCross} = do
rmGhcupDirs :: ( MonadReader AppState m
, MonadIO m
, MonadLogger m
, MonadCatch m )
, MonadCatch m
, MonadMask m )
=> m ()
rmGhcupDirs = do
dirs@Dirs
@ -1365,7 +1366,7 @@ rmGhcupDirs = do
removeDirIfEmpty logsDir
deleteFile filepath = do
hideError InappropriateType $ liftIO $ removeFile filepath
hideError InappropriateType $ rmFile filepath
removeDirIfEmpty filepath =
hideError UnsatisfiedConstraints $ liftIO $ removeDirectory filepath