Steps to reproduce: https://github.com/freeipa/freeipa-container/issues/248#issue-375492686
Culprit commit: caed210
The bug report doesn' follow the bug report template, e.g. doesn't state the version, expected behavior or use case. But I'll assume that the request here is to help in environments with and without less command. E.g. if there is less then show the output "paged" if not then print everything.
Also, the possible view on the bug could be that the respected client package doesn't depend on less.
a workaround is to set PAGER environment variable to a utility that can be used instead of less.
less
PAGER=more export PAGER ipa help commands
Easy fix: add less to package dependencies for python2-ipalib and python3-ipalib.
python2-ipalib
python3-ipalib
Metadata Update from @cheimes: - Issue tagged with: easyfix
+1. If FreeIPA's code calls external less, it should make sure it is installed via rpm Requires.
Note that there is already support for $PAGER. What is missing is the test for the executable existence.
If the pager lookup is extracted from open_in_pager() then this would be pretty trivial:
pager = get_pager() if os.path.exists(pager): open_in_pager(pager, data) else: for something in something: print
Metadata Update from @okozlov: - Issue assigned to okozlov
Metadata Update from @cheimes: - Assignee reset - Issue set to the milestone: FreeIPA 4.7.2
master:
ipa-4-7:
Fixed. Added checking of a pager's executable before subprocess.Popen.
subprocess.Popen
If PAGER environment variable is defined check it - do which (check the path, is it a file and check does it has +x). If it is ok - use a pager, otherwise - print function.
PAGER
which
+x
Metadata Update from @okozlov: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)
Metadata Update from @fcami: - Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1679958
Issue linked to Bugzilla: Bug 1679958
Login to comment on this ticket.