1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/cli
Yong Tang 315c34953d Show usage when docker swarm update has no flags
This fix tries to address the issue raised in 24352. Previously,
when `docker swarm update` has no flags, the output is
```
Swarm updated.
```
even though nothing was updated. This could be misleading for
users.

This fix tries to address the issue by adding a `PreRunE` function
in the command so that in case no flag is provided (`cmd.Flags().NFlag() == 0`),
the usage will be outputed instead.

An integration has been added to cover the changes.

This fix fixes 24352.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 5aa5a1cb00)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-15 21:07:18 -08:00
..
command Show usage when docker swarm update has no flags 2016-12-15 21:07:18 -08:00
flags Add for String 2016-11-03 16:15:26 +08:00
trust cli: Split out GetNotaryRepository and associated functions 2016-12-15 18:20:07 -08:00
cobra.go exit with status 1 if help is called on an invalid command. 2016-11-28 11:18:28 -08:00
error.go Remove old cli framework. 2016-08-25 13:09:04 -04:00
required.go fix typos 2016-07-05 20:42:17 +08:00