From 3fae516ce45610d77bf7deba88cdd935ec2dd3df Mon Sep 17 00:00:00 2001 From: Arjun Kathuria Date: Thu, 24 Jun 2021 10:08:12 +0530 Subject: [PATCH] Adds using 'rmFile' fn in rmGhcupDirs, it has better windows handling logic --- lib/GHCup.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/GHCup.hs b/lib/GHCup.hs index 0143b6e..12f2c12 100644 --- a/lib/GHCup.hs +++ b/lib/GHCup.hs @@ -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