Adapt code to optparse-applicative 0.18.1 and later.

optparse-applicative switched to the 'prettyprinter' library in its latest
release, which means the 'H.text' function has disappeared. Instead, 'H.pretty'
can be used to convert all 'Pretty a' types into a renderable document.
This commit is contained in:
Peter Simons 2023-06-21 16:46:54 +02:00 committed by Joey Hess
parent 79cf8f58d7
commit ffb708be09
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 2 additions and 2 deletions

View file

@ -116,7 +116,7 @@ parseCmd progname progdesc allargs allcmds getparser =
<*> getparser c
<*> parserAnnexOptions (cmdannexoptions c)
synopsis n d = n ++ " - " ++ d
intro = mconcat $ concatMap (\l -> [H.text l, H.line])
intro = mconcat $ concatMap (\l -> [H.pretty l, H.line])
(synopsis progname progdesc : commandList allcmds)
{- Selects the Command that matches the subcommand name.

View file

@ -311,7 +311,7 @@ Executable git-annex
Build-Depends:
base (>= 4.11.1.0 && < 5.0),
network-uri (>= 2.6),
optparse-applicative (>= 0.14.1),
optparse-applicative (>= 0.18.1),
containers (>= 0.5.8),
exceptions (>= 0.6),
stm (>= 2.3),