mirror of
https://github.com/openSUSE/osc.git
synced 2025-09-03 20:09:37 +02:00
Lex the contents of $PAGER to support pager commands with arguments.
Closes https://github.com/openSUSE/osc/issues/264.
This commit is contained in:
@@ -3918,8 +3918,9 @@ def run_pager(message, tmp_suffix=''):
|
||||
tmpfile.write(message)
|
||||
tmpfile.flush()
|
||||
pager = os.getenv('PAGER', default=get_default_pager())
|
||||
cmd = shlex.split(pager) + [tmpfile.name]
|
||||
try:
|
||||
run_external(pager, tmpfile.name)
|
||||
run_external(*cmd)
|
||||
finally:
|
||||
tmpfile.close()
|
||||
|
||||
|
Reference in New Issue
Block a user