updates usages of new installStackBin across files

This commit is contained in:
Arjun Kathuria 2021-07-25 22:24:38 +05:30
parent 6b89646c1e
commit 911089f334
3 changed files with 18 additions and 23 deletions

View File

@ -460,7 +460,7 @@ install' _ (_, ListResult {..}) = do
liftE $ installHLSBin lVer Nothing $> vi
Stack -> do
let vi = getVersionInfo lVer Stack dls
liftE $ installStackBin lVer $> vi
liftE $ installStackBin lVer Nothing $> vi
)
>>= \case
VRight vi -> do

View File

@ -1737,26 +1737,20 @@ Report bugs at <https://gitlab.haskell.org/haskell/ghcup-hs/issues>|]
pure $ ExitFailure 4
let installStack InstallOptions{..} =
(case isolateDir of
Just isoDir -> runInstTool instPlatform $ do
(v, vi) <- liftE $ fromVersion instVer Stack
let stackVersion = (_tvVersion v)
liftE $ installStackBinIsolated isoDir stackVersion
pure vi
Nothing ->
case instBindist of
Nothing -> runInstTool instPlatform $ do
(v, vi) <- liftE $ fromVersion instVer Stack
liftE $ installStackBin (_tvVersion v)
pure vi
Just uri -> do
s' <- appState
runInstTool' s'{ settings = settings { noVerify = True}} instPlatform $ do
(v, vi) <- liftE $ fromVersion instVer Stack
liftE $ installStackBindist
(DownloadInfo uri Nothing "")
(_tvVersion v)
pure vi
(case instBindist of
Nothing -> runInstTool instPlatform $ do
(v, vi) <- liftE $ fromVersion instVer Stack
liftE $ installStackBin (_tvVersion v) isolateDir
pure vi
Just uri -> do
s' <- appState
runInstTool' s'{ settings = settings { noVerify = True}} instPlatform $ do
(v, vi) <- liftE $ fromVersion instVer Stack
liftE $ installStackBindist
(DownloadInfo uri Nothing "")
(_tvVersion v)
isolateDir
pure vi
)
>>= \case
VRight vi -> do

View File

@ -671,6 +671,7 @@ installStackBin :: ( MonadMask m
, MonadFail m
)
=> Version
-> Maybe FilePath
-> Excepts
'[ AlreadyInstalled
, CopyError
@ -686,9 +687,9 @@ installStackBin :: ( MonadMask m
]
m
()
installStackBin ver = do
installStackBin ver isoFilepath = do
dlinfo <- liftE $ getDownloadInfo Stack ver
installStackBindist dlinfo ver
installStackBindist dlinfo ver isoFilepath
-- | Like 'installStackBin', except takes the 'DownloadInfo' as