Fix HLS install via compile

This commit is contained in:
Julian Ospald 2022-05-21 15:03:20 +02:00
parent b5fb8772fe
commit 68c81577a4
Signed by: hasufell
GPG Key ID: 3786C5262ECB4A3F
1 changed files with 5 additions and 1 deletions

View File

@ -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