mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
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:
parent
0c84856155
commit
24b850ee40
1 changed files with 9 additions and 1 deletions
|
|
@ -92,7 +92,15 @@ async def attr_instantiation_worker(
|
|||
) -> tuple[Path, str]:
|
||||
async with semaphore:
|
||||
eprint(f"Instantiating {attr_path}…")
|
||||
return (await nix_instantiate(attr_path), 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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue