Skip to content

Commit a41b57a

Browse files
Properly surface errors from build commands
the commit 38b13a3 ("Use asyncio for subprocess calls") broke the way exit codes are reported from the podman compose build command. The tasks are awaited as they finish which means that if a later build finishes sucessfully after a failing build, it overwrites status. Previously the `parse_return_code` function would skip updating the status if the new return code was zero, but in removing it, this logic was not carried forward. Fixes: 38b13a3 ("Use asyncio for subprocess calls")
1 parent 52e2912 commit a41b57a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

podman_compose.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2613,7 +2613,7 @@ async def compose_build(compose, args):
26132613
status = 0
26142614
for t in asyncio.as_completed(tasks):
26152615
s = await t
2616-
if s is not None:
2616+
if s is not None and s != 0:
26172617
status = s
26182618

26192619
return status

0 commit comments

Comments
 (0)