updates usages of new installCabalBindist across files.

This commit is contained in:
Arjun Kathuria
2021-07-25 21:24:50 +05:30
parent b148d8e2e7
commit bc6d006c57
3 changed files with 18 additions and 24 deletions

View File

@@ -451,7 +451,7 @@ install' _ (_, ListResult {..}) = do
liftE $ installGHCBin lVer Nothing $> vi
Cabal -> do
let vi = getVersionInfo lVer Cabal dls
liftE $ installCabalBin lVer $> vi
liftE $ installCabalBin lVer Nothing $> vi
GHCup -> do
let vi = snd <$> getLatest dls GHCup
liftE $ upgradeGHCup Nothing False $> vi

View File

@@ -1643,27 +1643,20 @@ Report bugs at <https://gitlab.haskell.org/haskell/ghcup-hs/issues>|]
let installCabal InstallOptions{..} =
(case isolateDir of
Just isoDir ->
runInstTool instPlatform $ do
(v, vi) <- liftE $ fromVersion instVer Cabal
let cabalVersion = (_tvVersion v)
liftE $ installCabalBinIsolated isoDir cabalVersion
pure vi
Nothing ->
case instBindist of
Nothing -> runInstTool instPlatform $ do
(v, vi) <- liftE $ fromVersion instVer Cabal
liftE $ installCabalBin (_tvVersion v)
pure vi
Just uri -> do
s' <- appState
runInstTool' s'{ settings = settings { noVerify = True}} instPlatform $ do
(v, vi) <- liftE $ fromVersion instVer Cabal
liftE $ installCabalBindist
(DownloadInfo uri Nothing "")
(_tvVersion v)
pure vi
(case instBindist of
Nothing -> runInstTool instPlatform $ do
(v, vi) <- liftE $ fromVersion instVer Cabal
liftE $ installCabalBin (_tvVersion v) isolateDir
pure vi
Just uri -> do
s' <- appState
runInstTool' s'{ settings = settings { noVerify = True}} instPlatform $ do
(v, vi) <- liftE $ fromVersion instVer Cabal
liftE $ installCabalBindist
(DownloadInfo uri Nothing "")
(_tvVersion v)
isolateDir
pure vi
)
>>= \case
VRight vi -> do