diff --git a/lib/GHCup.hs b/lib/GHCup.hs index eba55bb..7532b1a 100644 --- a/lib/GHCup.hs +++ b/lib/GHCup.hs @@ -1637,7 +1637,7 @@ upgradeGHCup mtarget force = do let fn = "ghcup" <> exeExt p <- liftE $ download settings dli tmp (Just fn) let destDir = takeDirectory destFile - destFile = fromMaybe (binDir fn) mtarget + destFile = fromMaybe (binDir (fn <> exeExt)) mtarget lift $ $(logDebug) [i|mkdir -p #{destDir}|] liftIO $ createDirRecursive' destDir lift $ $(logDebug) [i|rm -f #{destFile}|]