Fix handling of ansible-doc errors. (#4992)

This commit is contained in:
Matt Clay 2016-09-23 15:09:32 -07:00 committed by GitHub
parent edf361a5d4
commit 74120442f2

View file

@ -42,10 +42,12 @@ pip list
source hacking/env-setup
docs_status=0
PAGER=/bin/cat \
ANSIBLE_DEPRECATION_WARNINGS=false \
bin/ansible-doc -l \
2>/tmp/ansible-doc.err
2>/tmp/ansible-doc.err || docs_status=$?
if [ -s /tmp/ansible-doc.err ]; then
# report warnings as errors
@ -53,3 +55,8 @@ if [ -s /tmp/ansible-doc.err ]; then
cat /tmp/ansible-doc.err
exit 1
fi
if [ "${docs_status}" -ne 0 ]; then
echo "Running 'ansible-doc -l' failed with no output on stderr and exit code: ${docs_status}"
exit 1
fi