implements isolated install sanity-checking for Cabal installs

This commit is contained in:
Arjun Kathuria 2021-08-10 20:14:46 +05:30
parent bb430fa0b7
commit 300cfd3ba6
3 changed files with 6 additions and 1 deletions

View File

@ -442,6 +442,7 @@ install' _ (_, ListResult {..}) = do
, DownloadFailed
, NoUpdate
, TarDirDoesNotExist
, IsolatedDirNotEmpty
]
run (do

View File

@ -1478,6 +1478,7 @@ Report bugs at <https://gitlab.haskell.org/haskell/ghcup-hs/issues>|]
, TarDirDoesNotExist
, NextVerNotFound
, NoToolVersionSet
, IsolatedDirNotEmpty
]
let runInstTool mInstPlatform action' = do

View File

@ -405,6 +405,7 @@ installCabalBindist :: ( MonadMask m
#if !defined(TAR)
, ArchiveResult
#endif
, IsolatedDirNotEmpty
]
m
()
@ -425,7 +426,8 @@ installCabalBindist dlinfo ver isoFilepath = do
)
(throwE $ AlreadyInstalled Cabal ver)
_ -> pure () -- check isn't required in isolated installs
Just isoDir ->
liftE $ isolatedInstallSanityCheck isoDir
-- download (or use cached version)
dl <- liftE $ downloadCached dlinfo Nothing
@ -498,6 +500,7 @@ installCabalBin :: ( MonadMask m
#if !defined(TAR)
, ArchiveResult
#endif
, IsolatedDirNotEmpty
]
m
()