Skip to content

Commit ac8f69c

Browse files
authored
Re-enable traceback dumping (#44)
1 parent 3a7b173 commit ac8f69c

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

main.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,14 @@ echo Temp directory \"$build_dir\" is created
9090

9191
echo ::group:: Running Sphinx builder
9292
if ! sphinx-build -b html $INPUT_SPHINX_BUILD_OPTIONS "$doc_dir" "$build_dir"; then
93-
# See: https://github.com/sphinx-notes/pages/issues/28
94-
# echo ::endgroup::
95-
# echo ::group:: Dumping Sphinx error log
96-
# for l in $(ls /tmp/sphinx-err*); do
97-
# cat $l
98-
# done
93+
echo ::group:: Dumping Sphinx traceback
94+
for l in $(find /tmp -name 'sphinx-err*.log'); do
95+
# Replace "\n" to "%0A" for supporting multiline text in the error message.
96+
# https://github.com/actions/toolkit/issues/193#issuecomment-605394935
97+
traceback=$(tail -n100 $l | awk '{ printf "%s%%0A", $0 }')
98+
echo "::error title=Sphinx traceback::$traceback"
99+
done
100+
echo ::endgroup::
99101
exit 1
100102
fi
101103
echo ::endgroup::

0 commit comments

Comments
 (0)