From 40d2c4a0b799c767221c520017ce2c64c5af135a Mon Sep 17 00:00:00 2001 From: Ryan Marten Date: Mon, 16 Dec 2024 21:44:16 -0800 Subject: [PATCH] add back cwd --- build_pkg.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build_pkg.py b/build_pkg.py index ed2b86b8..80de2549 100644 --- a/build_pkg.py +++ b/build_pkg.py @@ -4,8 +4,8 @@ from pathlib import Path -def run_command(command): - result = subprocess.run(command, shell=True, check=True) +def run_command(command, cwd=None): + result = subprocess.run(command, shell=True, cwd=cwd, check=True) return result @@ -81,7 +81,7 @@ def nextjs_build(): def run_pytest(): print("Running pytest") try: - run_command("pytest -s") + run_command("pytest", cwd="tests") except subprocess.CalledProcessError: print("Pytest failed. Aborting build.") sys.exit(1)