From b40cefee357b1cb8c888f9c737fae3b11cb9cb10 Mon Sep 17 00:00:00 2001
From: Julian Ospald <hasufell@posteo.de>
Date: Sun, 13 Jun 2021 07:51:54 +0200
Subject: [PATCH] Fix 'ghcup upgrade' on windows

---
 lib/GHCup.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/GHCup.hs b/lib/GHCup.hs
index eba55bbb..7532b1a3 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}|]
-- 
GitLab