The Docker CLI
Go to file
Yong Tang 8e688f17a3 Improve error handling of experimental features in non-experimental mode
This fix tries to address several issues raised in 28626 where
run against a non-experimental daemon may not generate correct
error message:
1. Incorrect flags were not checked against the supported features:
   ```
   $ docker stack --nonsense
   unknown flag: --nonsense
   ```
2. Subcommands were not checked against the supported features:
   ```
   $ docker stack ls
   Error response from daemon: This node is not a swarm manager...
   ```

This fix address the above mentioned issues by:
1. Add a pre-check for FlagErrorFunc
2. Recursively check if a feature is supported for cmd and its parents.

This fix fixes 28626.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-02-10 16:54:19 -08:00
daemon_none.go Fix tests and windows service. 2016-08-25 13:09:36 -04:00
daemon_none_test.go Fix daemon command proxy. 2016-08-26 12:19:02 -04:00
daemon_unit_test.go Fix daemon command proxy. 2016-08-26 12:19:02 -04:00
daemon_unix.go Deprecate "daemon" subcommand 2016-09-23 00:26:27 +02:00
docker.go Improve error handling of experimental features in non-experimental mode 2017-02-10 16:54:19 -08:00
docker_test.go Move debug functions to cli/debug package 2016-12-12 09:33:58 +01:00
docker_windows.go Windows: work around Go 1.6.2/Nano Server TP5 issue 2016-05-25 11:59:28 +02:00