From 8b89721476ab6cb5e7f0769f03ad6287ca353709 Mon Sep 17 00:00:00 2001 From: Tiago Silva Date: Thu, 13 Oct 2022 18:47:35 +0000 Subject: [PATCH] port: fix container name in error message (#9909) The error message is using V1 separator hardcoded, it should be using the configured separator value. Signed-off-by: Tiago Silva --- pkg/compose/port.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/compose/port.go b/pkg/compose/port.go index c41781d04..cc96f4cd2 100644 --- a/pkg/compose/port.go +++ b/pkg/compose/port.go @@ -40,7 +40,7 @@ func (s *composeService) Port(ctx context.Context, projectName string, service s return "", 0, err } if len(list) == 0 { - return "", 0, fmt.Errorf("no container found for %s_%d", service, options.Index) + return "", 0, fmt.Errorf("no container found for %s%s%d", service, api.Separator, options.Index) } container := list[0] for _, p := range container.Ports {