Fix bug with removing set GHC version
This commit is contained in:
parent
340196bf9d
commit
b18aafe2c4
@ -376,6 +376,10 @@ rmGHCVer ver = do
|
|||||||
if exists
|
if exists
|
||||||
then do
|
then do
|
||||||
-- this isn't atomic, order matters
|
-- this isn't atomic, order matters
|
||||||
|
when isSetGHC $ do
|
||||||
|
lift $ $(logInfo) [i|Removing ghc symlinks|]
|
||||||
|
liftE $ rmPlain ver
|
||||||
|
|
||||||
lift $ $(logInfo) [i|Removing directory recursively: #{d'}|]
|
lift $ $(logInfo) [i|Removing directory recursively: #{d'}|]
|
||||||
liftIO $ deleteDirRecursive dir
|
liftIO $ deleteDirRecursive dir
|
||||||
|
|
||||||
@ -389,11 +393,6 @@ rmGHCVer ver = do
|
|||||||
(mj, mi) <- getGHCMajor ver
|
(mj, mi) <- getGHCMajor ver
|
||||||
getGHCForMajor mj mi >>= mapM_ (\v -> liftE $ setGHC v SetGHC_XY)
|
getGHCForMajor mj mi >>= mapM_ (\v -> liftE $ setGHC v SetGHC_XY)
|
||||||
|
|
||||||
|
|
||||||
when isSetGHC $ do
|
|
||||||
lift $ $(logInfo) [i|Removing ghc symlinks|]
|
|
||||||
liftE $ rmPlain ver
|
|
||||||
|
|
||||||
liftIO
|
liftIO
|
||||||
$ ghcupBaseDir
|
$ ghcupBaseDir
|
||||||
>>= hideError doesNotExistErrorType
|
>>= hideError doesNotExistErrorType
|
||||||
|
Loading…
Reference in New Issue
Block a user