Skip to content

Commit 8789df4

Browse files
committed
fix: show failed output on failure
Signed-off-by: Henry Schreiner <[email protected]>
1 parent c8eae11 commit 8789df4

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

cibuildwheel/platforms/linux.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -355,11 +355,12 @@ def build_in_container(
355355
container.call(["uv", "venv", venv_dir, "--python", python_bin / "python"], env=env)
356356
else:
357357
# Use embedded dependencies from virtualenv to ensure determinism
358-
venv_version = (
359-
container.call(["python", "-m", "virtualenv", "--version"], env=env)
360-
.strip()
361-
.split()[1]
362-
)
358+
venv_text = container.call(["python", "-m", "virtualenv", "--version"], env=env).strip()
359+
try:
360+
venv_version = venv_text.split()[1]
361+
except IndexError:
362+
msg = f"Invalid output, needs a space: {venv_text!r}"
363+
raise IndexError(msg) from None
363364
venv_args = ["--no-periodic-update", "--pip=embed", "--no-setuptools"]
364365
if Version(venv_version) < Version("20.31") or "38" in config.identifier:
365366
venv_args.append("--no-wheel")

0 commit comments

Comments
 (0)