Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions back/scripts/validate_distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,18 @@
from pathlib import Path


def run(command: list[str], cwd: Path) -> subprocess.CompletedProcess[str]:
def run(
command: list[str], cwd: Path, *, capture_output: bool = False
) -> subprocess.CompletedProcess[str]:
env = os.environ.copy()
env.pop("PYTHONPATH", None)
return subprocess.run( # noqa: S603 -- commands are assembled from CI-controlled paths
command, cwd=cwd, env=env, text=True, check=True
command,
cwd=cwd,
env=env,
text=True,
check=True,
capture_output=capture_output,
)


Expand Down Expand Up @@ -111,7 +118,7 @@ def assert_installed_candidate(
"print(json.dumps({'version': d.version, 'direct_url': "
"d.read_text('direct_url.json')}))"
)
result = run([str(python), "-c", probe], cwd)
result = run([str(python), "-c", probe], cwd, capture_output=True)
import json

installed = json.loads(result.stdout)
Expand Down
Loading