Fix handling of ansible-doc errors. (#3030)
This commit is contained in:
parent
8aa338ddfa
commit
a482a63ef6
1 changed files with 8 additions and 1 deletions
|
@ -42,10 +42,12 @@ pip list
|
||||||
|
|
||||||
source hacking/env-setup
|
source hacking/env-setup
|
||||||
|
|
||||||
|
docs_status=0
|
||||||
|
|
||||||
PAGER=/bin/cat \
|
PAGER=/bin/cat \
|
||||||
ANSIBLE_DEPRECATION_WARNINGS=false \
|
ANSIBLE_DEPRECATION_WARNINGS=false \
|
||||||
bin/ansible-doc -l \
|
bin/ansible-doc -l \
|
||||||
2>/tmp/ansible-doc.err
|
2>/tmp/ansible-doc.err || docs_status=$?
|
||||||
|
|
||||||
if [ -s /tmp/ansible-doc.err ]; then
|
if [ -s /tmp/ansible-doc.err ]; then
|
||||||
# report warnings as errors
|
# report warnings as errors
|
||||||
|
@ -53,3 +55,8 @@ if [ -s /tmp/ansible-doc.err ]; then
|
||||||
cat /tmp/ansible-doc.err
|
cat /tmp/ansible-doc.err
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
||||||
|
|
Loading…
Reference in a new issue