updates usages of installHLSBin
across files
This commit is contained in:
parent
e5d3080b54
commit
9c22ba9d45
@ -457,7 +457,7 @@ install' _ (_, ListResult {..}) = do
|
|||||||
liftE $ upgradeGHCup Nothing False $> vi
|
liftE $ upgradeGHCup Nothing False $> vi
|
||||||
HLS -> do
|
HLS -> do
|
||||||
let vi = getVersionInfo lVer HLS dls
|
let vi = getVersionInfo lVer HLS dls
|
||||||
liftE $ installHLSBin lVer $> vi
|
liftE $ installHLSBin lVer Nothing $> vi
|
||||||
Stack -> do
|
Stack -> do
|
||||||
let vi = getVersionInfo lVer Stack dls
|
let vi = getVersionInfo lVer Stack dls
|
||||||
liftE $ installStackBin lVer $> vi
|
liftE $ installStackBin lVer $> vi
|
||||||
|
@ -1675,26 +1675,20 @@ Report bugs at <https://gitlab.haskell.org/haskell/ghcup-hs/issues>|]
|
|||||||
pure $ ExitFailure 4
|
pure $ ExitFailure 4
|
||||||
|
|
||||||
let installHLS InstallOptions{..} =
|
let installHLS InstallOptions{..} =
|
||||||
(case isolateDir of
|
(case instBindist of
|
||||||
Just isoDir -> runInstTool instPlatform $ do
|
Nothing -> runInstTool instPlatform $ do
|
||||||
(v, vi) <- liftE $ fromVersion instVer HLS
|
(v, vi) <- liftE $ fromVersion instVer HLS
|
||||||
let hlsVersion = (_tvVersion v)
|
liftE $ installHLSBin (_tvVersion v) isolateDir
|
||||||
liftE $ installHLSBinIsolated isoDir hlsVersion
|
pure vi
|
||||||
pure vi
|
Just uri -> do
|
||||||
Nothing ->
|
s' <- appState
|
||||||
case instBindist of
|
runInstTool' s'{ settings = settings { noVerify = True}} instPlatform $ do
|
||||||
Nothing -> runInstTool instPlatform $ do
|
(v, vi) <- liftE $ fromVersion instVer HLS
|
||||||
(v, vi) <- liftE $ fromVersion instVer HLS
|
liftE $ installHLSBindist
|
||||||
liftE $ installHLSBin (_tvVersion v)
|
(DownloadInfo uri Nothing "")
|
||||||
pure vi
|
(_tvVersion v)
|
||||||
Just uri -> do
|
isolateDir
|
||||||
s' <- appState
|
pure vi
|
||||||
runInstTool' s'{ settings = settings { noVerify = True}} instPlatform $ do
|
|
||||||
(v, vi) <- liftE $ fromVersion instVer HLS
|
|
||||||
liftE $ installHLSBindist
|
|
||||||
(DownloadInfo uri Nothing "")
|
|
||||||
(_tvVersion v)
|
|
||||||
pure vi
|
|
||||||
)
|
)
|
||||||
>>= \case
|
>>= \case
|
||||||
VRight vi -> do
|
VRight vi -> do
|
||||||
|
@ -689,6 +689,7 @@ installHLSBin :: ( MonadMask m
|
|||||||
, MonadFail m
|
, MonadFail m
|
||||||
)
|
)
|
||||||
=> Version
|
=> Version
|
||||||
|
-> Maybe FilePath
|
||||||
-> Excepts
|
-> Excepts
|
||||||
'[ AlreadyInstalled
|
'[ AlreadyInstalled
|
||||||
, CopyError
|
, CopyError
|
||||||
@ -704,9 +705,9 @@ installHLSBin :: ( MonadMask m
|
|||||||
]
|
]
|
||||||
m
|
m
|
||||||
()
|
()
|
||||||
installHLSBin ver = do
|
installHLSBin ver isoFilepath = do
|
||||||
dlinfo <- liftE $ getDownloadInfo HLS ver
|
dlinfo <- liftE $ getDownloadInfo HLS ver
|
||||||
installHLSBindist dlinfo ver
|
installHLSBindist dlinfo ver isoFilepath
|
||||||
|
|
||||||
|
|
||||||
-- | Installs stack into @~\/.ghcup\/bin/stack-\<ver\>@ and
|
-- | Installs stack into @~\/.ghcup\/bin/stack-\<ver\>@ and
|
||||||
|
Loading…
Reference in New Issue
Block a user