From 2277013c76e31def6f9f2cff9302fa690a178012 Mon Sep 17 00:00:00 2001 From: Arjun Kathuria Date: Sat, 26 Jun 2021 20:05:21 +0530 Subject: [PATCH] hide unsupportedOperation error in windows ghcup bin removal in case of different drives. --- lib/GHCup.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/GHCup.hs b/lib/GHCup.hs index def8725..04c5feb 100644 --- a/lib/GHCup.hs +++ b/lib/GHCup.hs @@ -1298,7 +1298,9 @@ rmGhcup = do -- we move it to temp dir, to be deleted at next reboot tempDir <- liftIO $ getTemporaryDirectory let tempFilepath = tempDir ghcupFilename - liftIO $ hideError NoSuchThing $ Win32.moveFileEx ghcupFilepath (Just tempFilepath) 1 + hideError UnsupportedOperation $ + liftIO $ hideError NoSuchThing $ + Win32.moveFileEx ghcupFilepath (Just tempFilepath) 1 #else -- delete it. hideError doesNotExistErrorType $ liftIO $ rmFile ghcupFilepath