Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions cmd/compose/down.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,15 @@ func runDown(ctx context.Context, dockerCli command.Cli, backend api.Service, op
return err
}

// Validate service names
if project != nil {
for _, service := range services {
if _, exists := project.Services[service]; !exists {
return fmt.Errorf("no such service: %s", service)
}
}
}

var timeout *time.Duration
if opts.timeChanged {
timeoutValue := time.Duration(opts.timeout) * time.Second
Expand Down