diff --git a/internal/cli/kraft/cloud/compose/ps/ps.go b/internal/cli/kraft/cloud/compose/ps/ps.go index 0da10c30e..416877559 100644 --- a/internal/cli/kraft/cloud/compose/ps/ps.go +++ b/internal/cli/kraft/cloud/compose/ps/ps.go @@ -9,7 +9,6 @@ import ( "context" "fmt" "os" - "strings" "github.com/MakeNowJust/heredoc" "github.com/spf13/cobra" @@ -99,8 +98,8 @@ func (opts *PsOptions) Run(ctx context.Context, args []string) error { // if no services are specified, start all services if len(args) == 0 { - for _, service := range opts.Project.Services { - args = append(args, strings.SplitN(service.Name, "-", 2)[1]) + for service := range opts.Project.Services { + args = append(args, service) } } diff --git a/internal/cli/kraft/cloud/compose/stop/stop.go b/internal/cli/kraft/cloud/compose/stop/stop.go index 05fc270e4..f58bab97c 100644 --- a/internal/cli/kraft/cloud/compose/stop/stop.go +++ b/internal/cli/kraft/cloud/compose/stop/stop.go @@ -9,7 +9,6 @@ import ( "context" "fmt" "os" - "strings" "time" "github.com/MakeNowJust/heredoc" @@ -118,8 +117,8 @@ func (opts *StopOptions) Run(ctx context.Context, args []string) error { // If no services are specified, stop all services. if len(args) == 0 { - for _, service := range opts.Project.Services { - args = append(args, strings.SplitN(service.Name, "-", 2)[1]) + for service := range opts.Project.Services { + args = append(args, service) } }