From 319d7b146be989ba881aabb664e3cc2ba962905e Mon Sep 17 00:00:00 2001 From: Robert Grimm Date: Tue, 13 Aug 2024 08:03:57 -0400 Subject: [PATCH] don't run on Windows in GitHub actions; it won't work --- docs/pyextractor.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/pyextractor.py b/docs/pyextractor.py index d10d558..b179844 100755 --- a/docs/pyextractor.py +++ b/docs/pyextractor.py @@ -1,6 +1,7 @@ #!.venv/bin/python import json +import os from pathlib import Path import re import sys @@ -54,6 +55,10 @@ def traverse(item: Any) -> None: def main() -> None: if len(sys.argv) >= 2 and sys.argv[1] == "supports": + # The shell for GitHub Actions on Windows does not handle Unicode. + # So just don't run in that environment. + if "GITHUB_ACTION" in os.environ and os.name == "nt": + sys.exit(1) sys.exit(0) _, book = json.load(sys.stdin)