mirror of
https://github.com/docker/compose.git
synced 2026-08-30 05:29:30 +00:00
Detect task failures
Signed-off-by: aiordache <anca.iordache@docker.com>
This commit is contained in:
parent
144c403e96
commit
d3effd2ead
4 changed files with 126 additions and 17 deletions
|
|
@ -21,6 +21,7 @@ import (
|
|||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/pflag"
|
||||
|
|
@ -60,7 +61,8 @@ func runList(ctx context.Context, opts composeOptions) error {
|
|||
view := viewFromStackList(stackList)
|
||||
return formatter.Print(view, opts.Format, os.Stdout, func(w io.Writer) {
|
||||
for _, stack := range view {
|
||||
_, _ = fmt.Fprintf(w, "%s\t%s\n", stack.Name, stack.Status)
|
||||
_, _ = fmt.Fprintf(w, "%s\t%s\n", stack.Name, strings.TrimSpace(
|
||||
fmt.Sprintf("%s %s", stack.Status, stack.Reason))
|
||||
}
|
||||
}, "NAME", "STATUS")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue