summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2016-09-23 15:09:32 -0700
committerGitHub <noreply@github.com>2016-09-23 15:09:32 -0700
commit74120442f2b9ba34f1129b434994106d64ef04cb (patch)
tree1dbc85a51a695b081b5e2ad4c92d2d1e88b1f49d
parentedf361a5d4b45f2e7c7df1a133d5a09391508db2 (diff)
downloadansible-modules-core-74120442f2b9ba34f1129b434994106d64ef04cb.tar.gz
Fix handling of ansible-doc errors. (#4992)
-rwxr-xr-xtest/utils/shippable/docs.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/utils/shippable/docs.sh b/test/utils/shippable/docs.sh
index 9b5a6164..2858f87c 100755
--- a/test/utils/shippable/docs.sh
+++ b/test/utils/shippable/docs.sh
@@ -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