Fix 'ghcup upgrade' on windows

This commit is contained in:
Julian Ospald 2021-06-13 07:51:54 +02:00
parent ff32ccfb50
commit b40cefee35
Signed by: hasufell
GPG Key ID: 3786C5262ECB4A3F

View File

@ -1637,7 +1637,7 @@ upgradeGHCup mtarget force = do
let fn = "ghcup" <> exeExt let fn = "ghcup" <> exeExt
p <- liftE $ download settings dli tmp (Just fn) p <- liftE $ download settings dli tmp (Just fn)
let destDir = takeDirectory destFile let destDir = takeDirectory destFile
destFile = fromMaybe (binDir </> fn) mtarget destFile = fromMaybe (binDir </> (fn <> exeExt)) mtarget
lift $ $(logDebug) [i|mkdir -p #{destDir}|] lift $ $(logDebug) [i|mkdir -p #{destDir}|]
liftIO $ createDirRecursive' destDir liftIO $ createDirRecursive' destDir
lift $ $(logDebug) [i|rm -f #{destFile}|] lift $ $(logDebug) [i|rm -f #{destFile}|]