diff --git a/cli/cmd/context/ls.go b/cli/cmd/context/ls.go index f4485d62..b5119328 100644 --- a/cli/cmd/context/ls.go +++ b/cli/cmd/context/ls.go @@ -57,9 +57,7 @@ func listCommand() *cobra.Command { }, } cmd.Flags().BoolVarP(&opts.quiet, "quiet", "q", false, "Only show context names") - cmd.Flags().BoolVar(&opts.json, "json", false, "Format output as JSON") cmd.Flags().StringVar(&opts.format, "format", "", "Format the output. Values: [pretty | json]. (Default: pretty)") - _ = cmd.Flags().MarkHidden("json") return cmd } diff --git a/tests/e2e/e2e_test.go b/tests/e2e/e2e_test.go index b79775ea..f404bded 100644 --- a/tests/e2e/e2e_test.go +++ b/tests/e2e/e2e_test.go @@ -82,9 +82,6 @@ func TestContextDefault(t *testing.T) { res = c.RunDockerCmd("context", "ls", "--format", "json") golden.Assert(t, res.Stdout(), GoldenFile("ls-out-json")) - res = c.RunDockerCmd("context", "ls", "--json") - golden.Assert(t, res.Stdout(), GoldenFile("ls-out-json")) - res = c.RunDockerCmd("context", "ls", "--format", "{{ json . }}") golden.Assert(t, res.Stdout(), GoldenFile("ls-out-legacy-json")) })