From f7986cb4da0793b27ae6caeab6ed6039d79f68f3 Mon Sep 17 00:00:00 2001 From: Arjun Kathuria Date: Sat, 26 Jun 2021 21:56:52 +0530 Subject: [PATCH] integrate new rmGhcupDirs fn into Main.hs --- app/ghcup/Main.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/ghcup/Main.hs b/app/ghcup/Main.hs index 12b866b..07af343 100644 --- a/app/ghcup/Main.hs +++ b/app/ghcup/Main.hs @@ -1713,7 +1713,13 @@ Make sure to clean up #{tmpdir} afterwards.|]) lInstalled <- runLogger . flip runReaderT appstate $ listVersions Nothing (Just ListInstalled) forM_ lInstalled $ runRm . rmTool - runLogger $ runReaderT rmGhcupDirs appstate + leftOverFiles <- runLogger $ runReaderT rmGhcupDirs appstate + + case length leftOverFiles of + 0 -> runLogger $ $logInfo "Nuclear Annihilation complete!" + _ -> do + runLogger $ $logWarn "These Directories have survived Nuclear Annihilation, you'd may remove them manually." + forM_ leftOverFiles (runLogger . $logWarn . T.pack) pure ExitSuccess