mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-07 06:08:30 +00:00
Improve no command handling
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
+1
-3
@@ -378,9 +378,7 @@ func (runtime *Runtime) Create(config *Config, name string) (*Container, []strin
|
||||
}
|
||||
}
|
||||
|
||||
if len(config.Entrypoint) != 0 && config.Cmd == nil {
|
||||
config.Cmd = []string{}
|
||||
} else if config.Cmd == nil || len(config.Cmd) == 0 {
|
||||
if len(config.Entrypoint) == 0 && len(config.Cmd) == 0 {
|
||||
return nil, nil, fmt.Errorf("No command specified")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user