Skip to content

Commit

Permalink
add back cwd
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanMarten committed Dec 17, 2024
1 parent 9730c56 commit 40d2c4a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build_pkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 40d2c4a

Please sign in to comment.