From 2148de3e3ba608524a588191a9baaa890503de26 Mon Sep 17 00:00:00 2001 From: R1kaB3rN <100738684+R1kaB3rN@users.noreply.github.com> Date: Thu, 9 Jan 2025 13:55:05 -0800 Subject: [PATCH] check_imports: fix IndexError --- .github/scripts/check_imports.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/scripts/check_imports.py b/.github/scripts/check_imports.py index 3c56d824..4b55a444 100644 --- a/.github/scripts/check_imports.py +++ b/.github/scripts/check_imports.py @@ -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