report cancelled pull after another one failed

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De Loof 2025-05-15 18:59:22 +02:00 committed by Guillaume Lours
parent 944e5e67a1
commit 7f9101845d

View File

@ -204,6 +204,16 @@ func (s *composeService) pullServiceImage(ctx context.Context, service types.Ser
Platform: platform, Platform: platform,
}) })
if ctx.Err() != nil {
w.Event(progress.Event{
ID: service.Name,
Status: progress.Warning,
Text: "Warning",
StatusText: "Interrupted",
})
return "", nil
}
// check if has error and the service has a build section // check if has error and the service has a build section
// then the status should be warning instead of error // then the status should be warning instead of error
if err != nil && service.Build != nil { if err != nil && service.Build != nil {