mirror of
https://github.com/clearlinux/docker.git
synced 2026-10-03 15:28:35 +00:00
Fix docker run/exec/create not printing error messages
If an error message happens while parsing docker run or docker exec, the message is not being printed out. Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
This commit is contained in:
@@ -2164,7 +2164,7 @@ func (cli *DockerCli) CmdCreate(args ...string) error {
|
||||
|
||||
config, hostConfig, cmd, err := runconfig.Parse(cmd, args)
|
||||
if err != nil {
|
||||
return &utils.StatusError{StatusCode: 1}
|
||||
utils.ReportError(cmd, err.Error(), true)
|
||||
}
|
||||
if config.Image == "" {
|
||||
cmd.Usage()
|
||||
@@ -2201,7 +2201,7 @@ func (cli *DockerCli) CmdRun(args ...string) error {
|
||||
config, hostConfig, cmd, err := runconfig.Parse(cmd, args)
|
||||
// just in case the Parse does not exit
|
||||
if err != nil {
|
||||
return &utils.StatusError{StatusCode: 1}
|
||||
utils.ReportError(cmd, err.Error(), true)
|
||||
}
|
||||
if config.Image == "" {
|
||||
cmd.Usage()
|
||||
|
||||
Reference in New Issue
Block a user