mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
15d63f1c5b
The current error-handling only checked for version annotations on the subcommand itself, but did not check the top-level command. This patch always traverses the command path (parents), and prints an error if the command is not supported. Before this change: $ docker service Usage: docker service COMMAND Manage services Options: --help Print usage Commands: create Create a new service inspect Display detailed information on one or more services ls List services ps List the tasks of one or more services rm Remove one or more services scale Scale one or multiple replicated services update Update a service Run 'docker service COMMAND --help' for more information on a command. $ docker service ls ID NAME MODE REPLICAS IMAGE After this change: $ DOCKER_API_VERSION=1.12 docker service docker service requires API version 1.24, but the Docker daemon API version is 1.12 $ DOCKER_API_VERSION=1.12 docker service ls docker service ls requires API version 1.24, but the Docker daemon API version is 1.12 $ DOCKER_API_VERSION=1.24 docker plugin --help docker plugin requires API version 1.25, but the Docker daemon API version is 1.24 $ DOCKER_API_VERSION=1.25 docker plugin upgrade --help docker plugin upgrade requires API version 1.26, but the Docker daemon API version is 1.25 Signed-off-by: Sebastiaan van Stijn <github@gone.nl> |
||
---|---|---|
.. | ||
docker | ||
dockerd |