Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit 2121cc5

Browse files
authored
Merge pull request #878 from gtardif/remove_obsolete_hidden_json_flag
Remove obsolete flag `docker context ls --json` (that was marked hidden)
2 parents 4b88896 + db7d04d commit 2121cc5

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

cli/cmd/context/ls.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ func listCommand() *cobra.Command {
5757
},
5858
}
5959
cmd.Flags().BoolVarP(&opts.quiet, "quiet", "q", false, "Only show context names")
60-
cmd.Flags().BoolVar(&opts.json, "json", false, "Format output as JSON")
6160
cmd.Flags().StringVar(&opts.format, "format", "", "Format the output. Values: [pretty | json]. (Default: pretty)")
62-
_ = cmd.Flags().MarkHidden("json")
6361

6462
return cmd
6563
}

tests/e2e/e2e_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,6 @@ func TestContextDefault(t *testing.T) {
8282
res = c.RunDockerCmd("context", "ls", "--format", "json")
8383
golden.Assert(t, res.Stdout(), GoldenFile("ls-out-json"))
8484

85-
res = c.RunDockerCmd("context", "ls", "--json")
86-
golden.Assert(t, res.Stdout(), GoldenFile("ls-out-json"))
87-
8885
res = c.RunDockerCmd("context", "ls", "--format", "{{ json . }}")
8986
golden.Assert(t, res.Stdout(), GoldenFile("ls-out-legacy-json"))
9087
})

0 commit comments

Comments
 (0)