hide unsupportedOperation error in windows ghcup bin removal in case

of different drives.
This commit is contained in:
Arjun Kathuria 2021-06-26 20:05:21 +05:30
parent 8934e0e6bd
commit 2277013c76
1 changed files with 3 additions and 1 deletions

View File

@ -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