From d85bf80057ec9a835a534bf20d55bfbf11b7acbc Mon Sep 17 00:00:00 2001
From: BasLaa <baslaarakker@gmail.com>
Date: Wed, 1 Mar 2023 09:49:35 +0100
Subject: [PATCH] Fix switched name and email guess

---
 .../Distribution/Client/Init/NonInteractive/Command.hs    | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/cabal-install/src/Distribution/Client/Init/NonInteractive/Command.hs b/cabal-install/src/Distribution/Client/Init/NonInteractive/Command.hs
index 1e81728cda..bc317247df 100644
--- a/cabal-install/src/Distribution/Client/Init/NonInteractive/Command.hs
+++ b/cabal-install/src/Distribution/Client/Init/NonInteractive/Command.hs
@@ -276,14 +276,14 @@ licenseHeuristics flags = getLicense flags $ guessLicense flags
 -- | The author's name. Prompt, or try to guess from an existing
 --   git repo.
 authorHeuristics :: Interactive m => InitFlags -> m String
-authorHeuristics flags = guessAuthorEmail >>=
-  maybe (getAuthor flags $ return "") (getAuthor flags . return)
+authorHeuristics flags = guessAuthorName >>=
+  maybe (getAuthor flags $ return "Unknown") (getAuthor flags . return)
 
 -- | The author's email. Prompt, or try to guess from an existing
 --   git repo.
 emailHeuristics :: Interactive m => InitFlags -> m String
-emailHeuristics flags = guessAuthorName >>=
-  maybe (getEmail flags $ return "") (getEmail flags . return)
+emailHeuristics flags = guessAuthorEmail >>=
+  maybe (getEmail flags $ return "Unknown") (getEmail flags . return)
 
 -- | Prompt for a homepage URL for the package.
 homepageHeuristics :: Interactive m => InitFlags -> m String
-- 
GitLab