Return the version during 'ghcup compile ghc -g <commit>'

Fixes #181
This commit is contained in:
Julian Ospald 2021-07-20 11:42:36 +02:00
parent c5b4e82b48
commit 7a2570019a
Signed by: hasufell
GPG Key ID: 3786C5262ECB4A3F
1 changed files with 3 additions and 2 deletions

View File

@ -1930,14 +1930,15 @@ Report bugs at <https://gitlab.haskell.org/haskell/ghcup-hs/issues>|]
let vi = getVersionInfo (_tvVersion targetVer) GHC dls
when setCompile $ void $ liftE $
setGHC targetVer SetGHCOnly
pure vi
pure (vi, targetVer)
)
>>= \case
VRight vi -> do
VRight (vi, tv) -> do
runLogger $ $(logInfo)
"GHC successfully compiled and installed"
forM_ (_viPostInstall =<< vi) $ \msg ->
runLogger $ $(logInfo) msg
putStr (T.unpack $ tVerToText tv)
pure ExitSuccess
VLeft (V (AlreadyInstalled _ v)) -> do
runLogger $ $(logWarn)