docker top: fix command when multiple arguments are supplied

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 394a6d3154fe810565ddc5619447c8a82e7ce38c
Component: engine
This commit is contained in:
Erik Hollensbe
2014-08-31 01:18:15 -07:00
parent 7ffe4a077d
commit c382a20d9b
+1 -1
View File
@@ -29,7 +29,7 @@ func (daemon *Daemon) ContainerTop(job *engine.Job) engine.Status {
if err != nil {
return job.Error(err)
}
output, err := exec.Command("ps", psArgs).Output()
output, err := exec.Command("ps", strings.Split(psArgs, " ")...).Output()
if err != nil {
return job.Errorf("Error running ps: %s", err)
}