Skip to content

Commit

Permalink
use exit code
Browse files Browse the repository at this point in the history
  • Loading branch information
Lilith Hafner authored and Lilith Hafner committed Oct 16, 2023
1 parent 619ec8e commit ce44b04
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/SpellCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@ jobs:
python -c '
import sys, json
existing = set(typo["typo"] for typo in json.loads("["+sys.argv[1].replace("\n", ",")+"]"))
clean = True
for new in json.loads("["+sys.argv[2].replace("\n", ",")+"]"):
if new["typo"] not in existing:
clean = False
print("::warning file={},line={},col={}::perhaps \"{}\" should be \"{}\".".format(
new["path"], new["line_num"], new["byte_offset"],
new["typo"], " or ".join(new["corrections"])))' "$OLD_TYPOS" "$NEW_TYPOS"
new["typo"], " or ".join(new["corrections"])))
sys.exit(1 if not clean else 0)' "$OLD_TYPOS" "$NEW_TYPOS"

0 comments on commit ce44b04

Please sign in to comment.