a few cleanups for client output

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 5a6db4fd44c0e05c8b185174a9aa380c9cc4f719
Component: engine
This commit is contained in:
Qiang Huang
2015-05-05 15:59:17 +08:00
parent b677241c30
commit 50a36ca638
13 changed files with 58 additions and 34 deletions

View File

@ -90,8 +90,7 @@ func (cli *DockerCli) Cmd(args ...string) error {
if len(args) > 0 {
method, exists := cli.getMethod(args[0])
if !exists {
fmt.Fprintf(cli.err, "docker: '%s' is not a docker command. See 'docker --help'.\n", args[0])
os.Exit(1)
return fmt.Errorf("docker: '%s' is not a docker command. See 'docker --help'.", args[0])
}
return method(args[1:]...)
}