Skip to content

Commit

Permalink
don't run on Windows in GitHub actions; it won't work
Browse files Browse the repository at this point in the history
  • Loading branch information
apparebit committed Aug 13, 2024
1 parent 0dc0cf5 commit 319d7b1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/pyextractor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!.venv/bin/python

import json
import os
from pathlib import Path
import re
import sys
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 319d7b1

Please sign in to comment.