Skip to content

Commit

Permalink
check_imports: fix IndexError
Browse files Browse the repository at this point in the history
  • Loading branch information
R1kaB3rN committed Jan 9, 2025
1 parent 42bed22 commit 2148de3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/scripts/check_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@

PROJECT = Path(__file__).parent.parent.parent

PROTON_VERB = 'waitforexitandrun'


async def run_subproc(py_bin: str, file: Path) -> tuple[int, Path]:
"""Run a module via the Python interpreter"""
# Ensure this module is in PYTHONPATH
args = file.resolve(strict=True)
path = file.resolve(strict=True)
proc = await create_subprocess_exec(
py_bin, args, cwd=args.parent, env={'PYTHONPATH': str(PROJECT.parent)}
py_bin,
path,
PROTON_VERB,
cwd=path.parent,
env={'PYTHONPATH': str(PROJECT.parent)},
)
ret = await proc.wait()
return ret, file
Expand Down

0 comments on commit 2148de3

Please sign in to comment.