mirror of
https://github.com/docker/cli.git
synced 2026-08-30 02:24:27 -05:00
249d4e5709da7e1438e9eeab1190fb9f097b4058
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>
Languages
Go
92.3%
Shell
5.4%
Dockerfile
1.1%
Go-Checksums
0.7%
Makefile
0.3%
Other
0.2%