From 1695795aa25d6d2cf2be84fed3c063f66cf4cc70 Mon Sep 17 00:00:00 2001 From: fabriciojs Date: Sat, 28 Oct 2023 14:07:21 -0300 Subject: [PATCH] improve kool status output - fetch all services even if no container --- commands/status.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/commands/status.go b/commands/status.go index 32f82246..87aecf34 100644 --- a/commands/status.go +++ b/commands/status.go @@ -50,7 +50,7 @@ func NewKoolStatus() *KoolStatus { checker.NewChecker(defaultKoolService.shell), network.NewHandler(defaultKoolService.shell), environment.NewEnvStorage(), - builder.NewCommand("docker", "compose", "ps", "--all", "--services"), + builder.NewCommand("docker", "compose", "config", "--services"), builder.NewCommand("docker", "compose", "ps", "--all", "--quiet"), builder.NewCommand("docker", "ps", "--all", "--format", "{{.Status}}|{{.Ports}}"), shell.NewTableWriter(), @@ -65,7 +65,9 @@ func (s *KoolStatus) Execute(args []string) (err error) { return } - if services, err = s.getServices(); err != nil || len(services) == 0 { + if services, err = s.getServices(); err != nil { + return + } else if len(services) == 0 { s.Shell().Warning("No services found.") return }