You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This makes it impossible to obtain a list of all modules within another program, e.g. an online help system for Ansible modules like https://github.com/lunaryorn/ansible-doc.el
Steps To Reproduce:
Run
$ ansible-doc --list < /dev/null
Expected Results:
A list of all ansible modules, just like in ansible-doc --list (without < /dev/null)
Actual Results:
The following traceback:
stty: stdin isn't a terminal
Traceback (most recent call last):
File "/usr/local/Cellar/ansible/1.8.1/libexec/bin/ansible-doc", line 324, in <module>
main()
File "/usr/local/Cellar/ansible/1.8.1/libexec/bin/ansible-doc", line 266, in main
pager(get_module_list_text(module_list))
File "/usr/local/Cellar/ansible/1.8.1/libexec/bin/ansible-doc", line 168, in get_module_list_text
columns = max(60, int(os.popen('stty size', 'r').read().split()[1]))
IndexError: list index out of range
The text was updated successfully, but these errors were encountered:
swsnr
added a commit
to emacsorphanage/ansible-doc
that referenced
this issue
Dec 2, 2014
I have a fix for this problem, but there is now a 2nd issue, it seems that the detection of less fail if /dev/null is used for stdin. I will cook a 2nd commit to fix that.
Issue Type:
Bug Report
Ansible Version:
ansible 1.8.1
Environment:
OS X
Should be independent of the OS, though.
Summary:
ansible-doc --list
breaks if stdin is not a tty.This makes it impossible to obtain a list of all modules within another program, e.g. an online help system for Ansible modules like https://github.com/lunaryorn/ansible-doc.el
Steps To Reproduce:
Run
$ ansible-doc --list < /dev/null
Expected Results:
A list of all ansible modules, just like in
ansible-doc --list
(without< /dev/null
)Actual Results:
The following traceback:
The text was updated successfully, but these errors were encountered: