mirror of
https://github.com/docker/compose.git
synced 2025-07-21 12:44:54 +02:00
Merge pull request #85 from ulyssessouza/add-run-output
WIP - Missing e2e - Print container name when successful
This commit is contained in:
commit
2d14bfeb38
@ -29,6 +29,7 @@ package run
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/docker/docker/pkg/namesgenerator"
|
"github.com/docker/docker/pkg/namesgenerator"
|
||||||
@ -45,7 +46,11 @@ func Command() *cobra.Command {
|
|||||||
Short: "Run a container",
|
Short: "Run a container",
|
||||||
Args: cobra.ExactArgs(1),
|
Args: cobra.ExactArgs(1),
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
return runRun(cmd.Context(), args[0], opts)
|
if err := runRun(cmd.Context(), args[0], opts); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
fmt.Println(opts.name)
|
||||||
|
return nil
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user