Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit 9d9dbf3

Browse files
committed
Can't set -f as shortcut for --follow : conflict with --file
Signed-off-by: Nicolas De Loof <[email protected]>
1 parent 163f3b9 commit 9d9dbf3

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

cli/cmd/compose/logs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func logsCommand(p *projectOptions, contextType string) *cobra.Command {
4646
return runLogs(cmd.Context(), opts, args)
4747
},
4848
}
49-
logsCmd.Flags().BoolVarP(&opts.follow, "follow", "f", false, "Follow log output.")
49+
logsCmd.Flags().BoolVar(&opts.follow, "follow", false, "Follow log output.")
5050
if contextType == store.DefaultContextType {
5151
logsCmd.Flags().StringVar(&opts.tail, "tail", "all", "Number of lines to show from the end of the logs for each container.")
5252
}

local/compose/stop.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
"github.com/docker/compose-cli/api/progress"
2727
)
2828

29-
func (s *composeService) Stop(ctx context.Context, project *types.Project, consumer compose.LogConsumer) error {
29+
func (s *composeService) Stop(ctx context.Context, project *types.Project) error {
3030
w := progress.ContextWriter(ctx)
3131

3232
var containers Containers
@@ -39,9 +39,6 @@ func (s *composeService) Stop(ctx context.Context, project *types.Project, consu
3939
}
4040

4141
return InReverseDependencyOrder(ctx, project, func(c context.Context, service types.ServiceConfig) error {
42-
serviceContainers, others := containers.split(isService(service.Name))
43-
err := s.stopContainers(ctx, w, serviceContainers)
44-
containers = others
45-
return err
42+
return s.stopContainers(ctx, w, containers.filter(isService(service.Name)))
4643
})
4744
}

0 commit comments

Comments
 (0)