only stop services started by `up` on interruption

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De Loof 2022-11-29 15:02:08 +01:00 committed by Nicolas De loof
parent 06e71371ff
commit ed38fe0da8
1 changed files with 2 additions and 0 deletions

View File

@ -62,11 +62,13 @@ func (s *composeService) Up(ctx context.Context, project *types.Project, options
<-signalChan
s.Kill(ctx, project.Name, api.KillOptions{ //nolint:errcheck
Services: options.Create.Services,
Project: project,
})
}()
return s.Stop(ctx, project.Name, api.StopOptions{
Services: options.Create.Services,
Project: project,
})
})
}