ci: stop && from swallowing a check_project_rules failure

The step ran `check_project_rules.py && check_emphasis.py` with more
commands on following lines. Under `bash -e` the left operand of `&&`
is an exempt context, so a rules failure did NOT abort the step: it
short-circuited past check_emphasis.py, execution continued to the next
line, and the step exited with that last command's status -- green.

Demonstrated:
  bash -e -c 'false_check && emphasis
              next_cmd'          -> exit 0   (failure swallowed)
  bash -e -c 'false_check
              emphasis
              next_cmd'          -> exit 1   (correctly blocks)

So the repo's main content gate could fail while CI stayed green, and
today's new CJK emphasis gate was skipped entirely whenever it did.
Splitting the line restores fail-fast for both.

Swept all 14 repos: only this one and the other CI whose && line is
followed by further commands were affected; the 12 where the && list is
the last line of its run block already exit non-zero and are unchanged.

Verified: YAML parses, both checkers pass, repo test suite unchanged.
This commit is contained in:
yeasy
2026-07-24 19:05:25 -07:00
parent 95ee0aeca5
commit 21e43e1927
+2 -1
View File
@@ -51,7 +51,8 @@ jobs:
- name: Check project rules, metadata, and canonical examples
run: |
python3 check_project_rules.py && python3 check_emphasis.py
python3 check_project_rules.py
python3 check_emphasis.py
npm test
python3 tools/test_examples.py --require-tools