Skip to content

Commit 074d43e

Browse files
committed
report cancelled pull after another one failed
Signed-off-by: Nicolas De Loof <[email protected]>
1 parent 23fc76a commit 074d43e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pkg/compose/pull.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,16 @@ func (s *composeService) pullServiceImage(ctx context.Context, service types.Ser
204204
Platform: platform,
205205
})
206206

207+
if ctx.Err() != nil {
208+
w.Event(progress.Event{
209+
ID: service.Name,
210+
Status: progress.Warning,
211+
Text: "Warning",
212+
StatusText: "Cancelled",
213+
})
214+
return "", nil
215+
}
216+
207217
// check if has error and the service has a build section
208218
// then the status should be warning instead of error
209219
if err != nil && service.Build != nil {

0 commit comments

Comments
 (0)