From 1bcac178deb966f4fa53051da6b0ba83d382d910 Mon Sep 17 00:00:00 2001 From: Avasam Date: Mon, 19 Sep 2022 14:38:57 -0400 Subject: [PATCH] Support for npx 8 and pyrigth PyPI package --- tests/pyright_test.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/pyright_test.py b/tests/pyright_test.py index 29c7ebc87fa0..bfacf9c9cade 100755 --- a/tests/pyright_test.py +++ b/tests/pyright_test.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 +import os import shutil import subprocess import sys @@ -27,7 +28,9 @@ def main() -> None: print("error running npx; is Node.js installed?", file=sys.stderr) sys.exit(1) - command = [npx, "-p", f"pyright@{_PYRIGHT_VERSION}", "pyright"] + sys.argv[1:] + os.environ["PYRIGHT_PYTHON_FORCE_VERSION"] = _PYRIGHT_VERSION + command = [npx, f"pyright@{_PYRIGHT_VERSION}"] + sys.argv[1:] + print("Running:", " ".join(command)) ret = subprocess.run(command).returncode sys.exit(ret)