diff --git a/app/ghcup/BrickMain.hs b/app/ghcup/BrickMain.hs index 129a5cb..09ba831 100644 --- a/app/ghcup/BrickMain.hs +++ b/app/ghcup/BrickMain.hs @@ -457,7 +457,7 @@ install' _ (_, ListResult {..}) = do liftE $ upgradeGHCup Nothing False $> vi HLS -> do let vi = getVersionInfo lVer HLS dls - liftE $ installHLSBin lVer $> vi + liftE $ installHLSBin lVer Nothing $> vi Stack -> do let vi = getVersionInfo lVer Stack dls liftE $ installStackBin lVer $> vi diff --git a/app/ghcup/Main.hs b/app/ghcup/Main.hs index c1246ae..cc429e8 100644 --- a/app/ghcup/Main.hs +++ b/app/ghcup/Main.hs @@ -1705,26 +1705,20 @@ Report bugs at |] pure $ ExitFailure 4 let installHLS InstallOptions{..} = - (case isolateDir of - Just isoDir -> runInstTool instPlatform $ do - (v, vi) <- liftE $ fromVersion instVer HLS - let hlsVersion = (_tvVersion v) - liftE $ installHLSBinIsolated isoDir hlsVersion - pure vi - Nothing -> - case instBindist of - Nothing -> runInstTool instPlatform $ do - (v, vi) <- liftE $ fromVersion instVer HLS - liftE $ installHLSBin (_tvVersion v) - pure vi - Just uri -> do - s' <- appState - runInstTool' s'{ settings = settings { noVerify = True}} instPlatform $ do - (v, vi) <- liftE $ fromVersion instVer HLS - liftE $ installHLSBindist - (DownloadInfo uri Nothing "") - (_tvVersion v) - pure vi + (case instBindist of + Nothing -> runInstTool instPlatform $ do + (v, vi) <- liftE $ fromVersion instVer HLS + liftE $ installHLSBin (_tvVersion v) isolateDir + pure vi + Just uri -> do + s' <- appState + runInstTool' s'{ settings = settings { noVerify = True}} instPlatform $ do + (v, vi) <- liftE $ fromVersion instVer HLS + liftE $ installHLSBindist + (DownloadInfo uri Nothing "") + (_tvVersion v) + isolateDir + pure vi ) >>= \case VRight vi -> do diff --git a/lib/GHCup.hs b/lib/GHCup.hs index caa4d86..6d72328 100644 --- a/lib/GHCup.hs +++ b/lib/GHCup.hs @@ -689,6 +689,7 @@ installHLSBin :: ( MonadMask m , MonadFail m ) => Version + -> Maybe FilePath -> Excepts '[ AlreadyInstalled , CopyError @@ -704,9 +705,9 @@ installHLSBin :: ( MonadMask m ] m () -installHLSBin ver = do +installHLSBin ver isoFilepath = do dlinfo <- liftE $ getDownloadInfo HLS ver - installHLSBindist dlinfo ver + installHLSBindist dlinfo ver isoFilepath -- | Installs stack into @~\/.ghcup\/bin/stack-\@ and