From 81fd8d935a25212d9b38c9b8b41fac2c22d42d58 Mon Sep 17 00:00:00 2001
From: Aiken Cairncross <acairncross@gmail.com>
Date: Fri, 25 Sep 2020 18:31:59 +0100
Subject: [PATCH] Fix command notes being replaced by descriptions

This was causing the description of "new" prefixed and unprefixed
commands to be printed at both the top and bottom of their help text.
---
 cabal-install/Distribution/Client/CmdLegacy.hs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cabal-install/Distribution/Client/CmdLegacy.hs b/cabal-install/Distribution/Client/CmdLegacy.hs
index a8b0bb0b11..883bba8be4 100644
--- a/cabal-install/Distribution/Client/CmdLegacy.hs
+++ b/cabal-install/Distribution/Client/CmdLegacy.hs
@@ -138,7 +138,7 @@ newCmd origUi@CommandUI{..} action = [cmd defaultUi, cmd newUi, cmd origUi]
             { commandName = newMsg commandName
             , commandUsage = newMsg . commandUsage
             , commandDescription = (newMsg .) <$> commandDescription
-            , commandNotes = (newMsg .) <$> commandDescription
+            , commandNotes = (newMsg .) <$> commandNotes
             }
 
         defaultMsg = T.unpack . T.replace "v2-" "" . T.pack
@@ -146,5 +146,5 @@ newCmd origUi@CommandUI{..} action = [cmd defaultUi, cmd newUi, cmd origUi]
             { commandName = defaultMsg commandName
             , commandUsage = defaultMsg . commandUsage
             , commandDescription = (defaultMsg .) <$> commandDescription
-            , commandNotes = (defaultMsg .) <$> commandDescription
+            , commandNotes = (defaultMsg .) <$> commandNotes
             }
-- 
GitLab