Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit 2d14bfe

Browse files
authored
Merge pull request #85 from ulyssessouza/add-run-output
WIP - Missing e2e - Print container name when successful
2 parents 67a7c96 + 80bc3f3 commit 2d14bfe

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cli/cmd/run/run.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ package run
2929

3030
import (
3131
"context"
32+
"fmt"
3233
"strings"
3334

3435
"github.com/docker/docker/pkg/namesgenerator"
@@ -45,7 +46,11 @@ func Command() *cobra.Command {
4546
Short: "Run a container",
4647
Args: cobra.ExactArgs(1),
4748
RunE: func(cmd *cobra.Command, args []string) error {
48-
return runRun(cmd.Context(), args[0], opts)
49+
if err := runRun(cmd.Context(), args[0], opts); err != nil {
50+
return err
51+
}
52+
fmt.Println(opts.name)
53+
return nil
4954
},
5055
}
5156

0 commit comments

Comments
 (0)