Skip to content

Commit

Permalink
Pre-wrap the legacy command notes.
Browse files Browse the repository at this point in the history
It was being properly wrapped when the command was invoked, but not
for --help output. Hard-wrapping is unfortunate but it's the best we
can do in this scenario; it's better than the previous manual
wrapping, at least.
  • Loading branch information
quasicomputational committed Jun 25, 2018
1 parent 8df2210 commit 0c97920
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cabal-install/Distribution/Client/CmdLegacy.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Distribution.Client.SetupWrapper
import qualified Distribution.Simple.Setup as Setup
import Distribution.Simple.Command
import Distribution.Simple.Utils
( warn )
( warn, wrapText )
import Distribution.Verbosity
( Verbosity, normal )

Expand Down Expand Up @@ -109,7 +109,7 @@ instance HasVerbosity Setup.DoctestFlags where
--

deprecationNote :: String -> String
deprecationNote cmd =
deprecationNote cmd = wrapText $
"The " ++ cmd ++ " command is a part of the legacy v1 style of cabal usage.\n\n" ++

"Please switch to using either the new project style and the new-" ++ cmd ++
Expand All @@ -120,7 +120,7 @@ deprecationNote cmd =
"For more information, see: https://wiki.haskell.org/Cabal/NewBuild\n"

legacyNote :: String -> String
legacyNote cmd =
legacyNote cmd = wrapText $
"The v1-" ++ cmd ++ " command is a part of the legacy v1 style of cabal usage.\n\n" ++

"It is a legacy feature and will be removed in a future release of cabal-install." ++
Expand Down

0 comments on commit 0c97920

Please sign in to comment.