Skip to content

Commit

Permalink
Simplify error output redirect in lint.sh
Browse files Browse the repository at this point in the history
To avoid "Syntax error: redirection unexpected"
  • Loading branch information
rffontenelle authored Oct 17, 2024
1 parent 1d2a32c commit c575780
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ make build ALLSPHINXOPTS="$opts"
sphinx-intl update -d locale -p build/gettext -l ${PYDOC_LANGUAGE} > /dev/null

cd locale/${PYDOC_LANGUAGE}/LC_MESSAGES
sphinx-lint 2> >(tee -a $(realpath "$rootdir/logs/sphinxlint.txt") >&2)
sphinx-lint 2> $(realpath "$rootdir/logs/sphinxlint.txt")

# Undo changes to undo literal blocks disabling
git checkout .
Expand All @@ -41,6 +41,7 @@ if [ ! -s logs/sphinxlint.txt ]; then
# OK, it is empty. Remove it.
rm logs/sphinxlint.txt
else
# has contents, exit with error status (to trigger notification in CI)
# print contents and exit with error status (to trigger notification in CI)
cat logs/sphinxlint.txt
exit 1
fi

0 comments on commit c575780

Please sign in to comment.