Fix upgrade subcommand running appstate twice
This commit is contained in:
parent
e4e52ebf6b
commit
0c666a6bbe
@ -2026,9 +2026,12 @@ Make sure to clean up #{tmpdir} afterwards.|])
|
|||||||
(UpgradeAt p) -> pure $ Just p
|
(UpgradeAt p) -> pure $ Just p
|
||||||
UpgradeGHCupDir -> pure (Just (binDir </> "ghcup" <> exeExt))
|
UpgradeGHCupDir -> pure (Just (binDir </> "ghcup" <> exeExt))
|
||||||
|
|
||||||
runUpgrade (liftE $ upgradeGHCup target force') >>= \case
|
runUpgrade (do
|
||||||
VRight v' -> do
|
v' <- liftE $ upgradeGHCup target force'
|
||||||
GHCupInfo { _ghcupDownloads = dls } <- runAppState getGHCupInfo
|
GHCupInfo { _ghcupDownloads = dls } <- lift getGHCupInfo
|
||||||
|
pure (v', dls)
|
||||||
|
) >>= \case
|
||||||
|
VRight (v', dls) -> do
|
||||||
let pretty_v = prettyVer v'
|
let pretty_v = prettyVer v'
|
||||||
let vi = fromJust $ snd <$> getLatest dls GHCup
|
let vi = fromJust $ snd <$> getLatest dls GHCup
|
||||||
runLogger $ $(logInfo)
|
runLogger $ $(logInfo)
|
||||||
|
Loading…
Reference in New Issue
Block a user