implements isolated install sanity-checking for Cabal installs
This commit is contained in:
parent
bb430fa0b7
commit
300cfd3ba6
@ -442,6 +442,7 @@ install' _ (_, ListResult {..}) = do
|
||||
, DownloadFailed
|
||||
, NoUpdate
|
||||
, TarDirDoesNotExist
|
||||
, IsolatedDirNotEmpty
|
||||
]
|
||||
|
||||
run (do
|
||||
|
@ -1478,6 +1478,7 @@ Report bugs at <https://gitlab.haskell.org/haskell/ghcup-hs/issues>|]
|
||||
, TarDirDoesNotExist
|
||||
, NextVerNotFound
|
||||
, NoToolVersionSet
|
||||
, IsolatedDirNotEmpty
|
||||
]
|
||||
|
||||
let runInstTool mInstPlatform action' = do
|
||||
|
@ -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
|
||||
()
|
||||
|
Loading…
Reference in New Issue
Block a user