1
0
Fork 0
mirror of https://git.freebsd.org/ports.git synced 2025-06-18 03:00:42 -04:00
ports/devel/awscli/files/patch-awscli_help.py
Bradley T. Hughes f06c932531 devel/awscli: add files missing from r511778
PR:		240664
Submitted by:	nork@ninth-nine.com
Sponsored by:	Miles AS
2019-09-25 19:06:04 +00:00

23 lines
1 KiB
Python

--- awscli/help.py.orig 2019-08-27 18:05:04 UTC
+++ awscli/help.py
@@ -107,13 +107,16 @@ class PosixHelpRenderer(PagingHelpRenderer):
def _convert_doc_content(self, contents):
man_contents = publish_string(contents, writer=manpage.Writer())
- if not self._exists_on_path('groff'):
+ if self._exists_on_path('groff'):
+ cmdline = ['groff', '-m', 'man', '-T', 'ascii']
+ elif self._exists_on_path('mandoc'):
+ cmdline = ['mandoc', '-man', '-T', 'ascii']
+ else:
raise ExecutableNotFoundError('groff')
- cmdline = ['groff', '-m', 'man', '-T', 'ascii']
LOG.debug("Running command: %s", cmdline)
p3 = self._popen(cmdline, stdin=PIPE, stdout=PIPE, stderr=PIPE)
- groff_output = p3.communicate(input=man_contents)[0]
- return groff_output
+ man_output = p3.communicate(input=man_contents)[0]
+ return man_output
def _send_output_to_pager(self, output):
cmdline = self.get_pager_cmdline()