updates usages of new installCabalBindist
across files.
This commit is contained in:
parent
1f760af880
commit
236da31af6
@ -451,7 +451,7 @@ install' _ (_, ListResult {..}) = do
|
|||||||
liftE $ installGHCBin lVer Nothing $> vi
|
liftE $ installGHCBin lVer Nothing $> vi
|
||||||
Cabal -> do
|
Cabal -> do
|
||||||
let vi = getVersionInfo lVer Cabal dls
|
let vi = getVersionInfo lVer Cabal dls
|
||||||
liftE $ installCabalBin lVer $> vi
|
liftE $ installCabalBin lVer Nothing $> vi
|
||||||
GHCup -> do
|
GHCup -> do
|
||||||
let vi = snd <$> getLatest dls GHCup
|
let vi = snd <$> getLatest dls GHCup
|
||||||
liftE $ upgradeGHCup Nothing False $> vi
|
liftE $ upgradeGHCup Nothing False $> vi
|
||||||
|
@ -1673,27 +1673,20 @@ Report bugs at <https://gitlab.haskell.org/haskell/ghcup-hs/issues>|]
|
|||||||
|
|
||||||
|
|
||||||
let installCabal InstallOptions{..} =
|
let installCabal InstallOptions{..} =
|
||||||
(case isolateDir of
|
(case instBindist of
|
||||||
Just isoDir ->
|
Nothing -> runInstTool instPlatform $ do
|
||||||
runInstTool instPlatform $ do
|
(v, vi) <- liftE $ fromVersion instVer Cabal
|
||||||
(v, vi) <- liftE $ fromVersion instVer Cabal
|
liftE $ installCabalBin (_tvVersion v) isolateDir
|
||||||
let cabalVersion = (_tvVersion v)
|
pure vi
|
||||||
liftE $ installCabalBinIsolated isoDir cabalVersion
|
Just uri -> do
|
||||||
pure vi
|
s' <- appState
|
||||||
Nothing ->
|
runInstTool' s'{ settings = settings { noVerify = True}} instPlatform $ do
|
||||||
case instBindist of
|
(v, vi) <- liftE $ fromVersion instVer Cabal
|
||||||
Nothing -> runInstTool instPlatform $ do
|
liftE $ installCabalBindist
|
||||||
(v, vi) <- liftE $ fromVersion instVer Cabal
|
(DownloadInfo uri Nothing "")
|
||||||
liftE $ installCabalBin (_tvVersion v)
|
(_tvVersion v)
|
||||||
pure vi
|
isolateDir
|
||||||
Just uri -> do
|
pure vi
|
||||||
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
|
>>= \case
|
||||||
VRight vi -> do
|
VRight vi -> do
|
||||||
|
@ -545,6 +545,7 @@ installCabalBin :: ( MonadMask m
|
|||||||
, MonadFail m
|
, MonadFail m
|
||||||
)
|
)
|
||||||
=> Version
|
=> Version
|
||||||
|
-> Maybe FilePath -- isolated install Path, if user provided any
|
||||||
-> Excepts
|
-> Excepts
|
||||||
'[ AlreadyInstalled
|
'[ AlreadyInstalled
|
||||||
, CopyError
|
, CopyError
|
||||||
@ -560,9 +561,9 @@ installCabalBin :: ( MonadMask m
|
|||||||
]
|
]
|
||||||
m
|
m
|
||||||
()
|
()
|
||||||
installCabalBin ver = do
|
installCabalBin ver isoFilepath = do
|
||||||
dlinfo <- liftE $ getDownloadInfo Cabal ver
|
dlinfo <- liftE $ getDownloadInfo Cabal ver
|
||||||
installCabalBindist dlinfo ver
|
installCabalBindist dlinfo ver isoFilepath
|
||||||
|
|
||||||
|
|
||||||
-- | Like 'installHLSBin, except takes the 'DownloadInfo' as
|
-- | Like 'installHLSBin, except takes the 'DownloadInfo' as
|
||||||
|
Loading…
Reference in New Issue
Block a user