Commit Graph

3 Commits

Author SHA1 Message Date
Sebastiaan van Stijn 6ba7de3b5a
cli/command/context: "docker context show": don't validate context
The "docker context show" command is intended to show the currently configured
context. While the context that's configured may not be valid (e.g., in case
an environment variable was set to configure the context, or if the context
was removed from the filesystem), we should still be able to _show_ the
context.

This patch removes the context validation, and instead only shows the context.
This can help in cases where the context is used to (e.g.) set the command-
prompt, but the user removed the context. With this change, the context name
can still be shown, but commands that _require_ the context will still fail.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-11-28 11:30:35 +01:00
Nicolas De Loof cbec75e2f3
Adopt Cobra completion v2 to support completion by CLI plugins
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-05-12 12:59:10 +02:00
Nicolas De Loof e9a4d7e611
introduce `context show` command
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-04-25 14:40:24 +02:00