Skip to content
Snippets Groups Projects
Verified Commit a029fa4b authored by Julian Ospald's avatar Julian Ospald :tea:
Browse files

Fix 'rmDir'

parent 4d96886e
No related branches found
No related tags found
1 merge request!100Debug CI
Pipeline #37708 failed
...@@ -1399,10 +1399,12 @@ rmGhcupDirs = do ...@@ -1399,10 +1399,12 @@ rmGhcupDirs = do
$logInfo "removing Ghcup Config File" $logInfo "removing Ghcup Config File"
hideError doesNotExistErrorType $ liftIO $ deleteFile confFilePath hideError doesNotExistErrorType $ liftIO $ deleteFile confFilePath
rmDir :: (MonadLogger m, MonadIO m) => FilePath -> m () rmDir :: (MonadLogger m, MonadIO m, MonadCatch m) => FilePath -> m ()
rmDir dir = do rmDir dir = do
$logInfo [i|removing #{dir}|] $logInfo [i|removing #{dir}|]
contents <- liftIO $ getDirectoryContentsRecursive dir contents <- hideErrorDef [doesNotExistErrorType] []
$ liftIO
$ getDirectoryContentsRecursive dir
forM_ contents (liftIO . deleteFile . (dir </>)) forM_ contents (liftIO . deleteFile . (dir </>))
rmBinDir :: (MonadCatch m, MonadIO m) => FilePath -> m () rmBinDir :: (MonadCatch m, MonadIO m) => FilePath -> m ()
......
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