Removed redundant print line and fixed handling of command-less docker
invocation.
Signed-off-by: Michal Minar <miminar@redhat.com>
| ... | ... |
@@ -63,7 +63,6 @@ func (cli *DockerCli) CmdHelp(args ...string) error {
|
| 63 | 63 |
if len(args) > 0 {
|
| 64 | 64 |
method, exists := cli.getMethod(args[0]) |
| 65 | 65 |
if !exists {
|
| 66 |
- fmt.Fprintf(cli.err, "Error: Command not found: %s\n", args[0]) |
|
| 67 | 66 |
fmt.Fprintf(cli.err, "docker: '%s' is not a docker command. See 'docker --help'.\n", args[0]) |
| 68 | 67 |
os.Exit(1) |
| 69 | 68 |
} else {
|
| ... | ... |
@@ -26,9 +26,9 @@ func ParseFlags(cmd *flag.FlagSet, args []string, withHelp bool) error {
|
| 26 | 26 |
if str := cmd.CheckArgs(); str != "" {
|
| 27 | 27 |
if withHelp {
|
| 28 | 28 |
if os.Args[0] == cmd.Name() {
|
| 29 |
- str += ". See '" + os.Args[0] + " " + cmd.Name() + " --help'" |
|
| 30 |
- } else {
|
|
| 31 | 29 |
str += ". See '" + os.Args[0] + " --help'" |
| 30 |
+ } else {
|
|
| 31 |
+ str += ". See '" + os.Args[0] + " " + cmd.Name() + " --help'" |
|
| 32 | 32 |
} |
| 33 | 33 |
} |
| 34 | 34 |
fmt.Fprintf(cmd.Out(), "docker: %s.\n", str) |