maintainers/scripts/update.nix: Print stderr on instantiation failure

For some reason `asyncio.create_subprocess_exec` freezes after failing previous call returns `CalledProcessError`.
Perhaps because `asyncio.gather` fails and cancels the later tasks, triggering https://github.com/python/cpython/issues/103847
This commit is contained in:
Jan Tojnar
2025-09-06 17:21:24 +02:00
parent 0c84856155
commit 24b850ee40

View File

@@ -92,7 +92,15 @@ async def attr_instantiation_worker(
) -> tuple[Path, str]:
async with semaphore:
eprint(f"Instantiating {attr_path}")
try:
return (await nix_instantiate(attr_path), attr_path)
except Exception as e:
# Failure should normally terminate the script but
# looks like Python is buggy so we need to do it ourselves.
eprint(f"Failed to instantiate {attr_path}")
if e.stderr:
eprint(e.stderr.decode("utf-8"))
sys.exit(1)
async def requisites_worker(