mirror of https://github.com/docker/compose.git
Only capture exit codes from `exit` events
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
This commit is contained in:
parent
0d2beddf20
commit
8301dc8314
|
@ -93,6 +93,7 @@ func (p *printer) Run(ctx context.Context, cascadeStop bool, exitCodeFrom string
|
|||
return 0, err
|
||||
}
|
||||
}
|
||||
if event.Type == api.ContainerEventExit {
|
||||
if exitCodeFrom == "" {
|
||||
exitCodeFrom = event.Service
|
||||
}
|
||||
|
@ -100,6 +101,7 @@ func (p *printer) Run(ctx context.Context, cascadeStop bool, exitCodeFrom string
|
|||
exitCode = event.ExitCode
|
||||
}
|
||||
}
|
||||
}
|
||||
if len(containers) == 0 {
|
||||
// Last container terminated, done
|
||||
return exitCode, nil
|
||||
|
|
Loading…
Reference in New Issue