diff --git a/app/ghcup/BrickMain.hs b/app/ghcup/BrickMain.hs index 93ff739..a320087 100644 --- a/app/ghcup/BrickMain.hs +++ b/app/ghcup/BrickMain.hs @@ -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 diff --git a/app/ghcup/Main.hs b/app/ghcup/Main.hs index 3b2e7aa..34caac0 100644 --- a/app/ghcup/Main.hs +++ b/app/ghcup/Main.hs @@ -1707,26 +1707,20 @@ Report bugs at |] 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 diff --git a/lib/GHCup.hs b/lib/GHCup.hs index 576084a..d1e6a9e 100644 --- a/lib/GHCup.hs +++ b/lib/GHCup.hs @@ -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