From 68c81577a4a1e208879e206cb4b268d779163a9d Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sat, 21 May 2022 15:03:20 +0200 Subject: [PATCH] Fix HLS install via compile --- lib/GHCup.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/GHCup.hs b/lib/GHCup.hs index 2d09ab7..d8b2a5c 100644 --- a/lib/GHCup.hs +++ b/lib/GHCup.hs @@ -710,6 +710,10 @@ installHLSUnpackedLegacy path installDir ver forceInstall = do let srcPath = path f let destPath = fromInstallDir installDir toF + -- destination could be an existing symlink + -- for new make-based HLSes + liftIO $ rmFileForce destPath + copyFileE srcPath destPath @@ -727,6 +731,7 @@ installHLSUnpackedLegacy path installDir ver forceInstall = do srcWrapperPath = path wrapper <> exeExt destWrapperPath = fromInstallDir installDir toF + liftIO $ rmFileForce destWrapperPath copyFileE srcWrapperPath destWrapperPath @@ -935,7 +940,6 @@ compileHLS targetHLS ghcs jobs ov installDir cabalProject cabalProjectLocal patc (tmpInstallDir "haskell-language-server-" <> takeFileName artifact <.> exeExt) liftIO $ renameFile (artifact "haskell-language-server-wrapper" <.> exeExt) (tmpInstallDir "haskell-language-server-wrapper" <.> exeExt) - liftIO $ hideError NoSuchThing $ rmFile artifact case installDir of IsolateDir isoDir -> do