From ab0407e1ed20d46898ee22e56e9d69e7c41089d5 Mon Sep 17 00:00:00 2001 From: Philippe Martin Date: Wed, 29 Mar 2023 18:40:21 +0200 Subject: [PATCH] Clarify --details is to be used with --devfile --- docs/website/docs/command-reference/json-output.md | 2 +- docs/website/docs/command-reference/registry.md | 2 +- pkg/odo/cli/registry/registry.go | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/website/docs/command-reference/json-output.md b/docs/website/docs/command-reference/json-output.md index d7fc6d5dfa9..a24db22a5ac 100644 --- a/docs/website/docs/command-reference/json-output.md +++ b/docs/website/docs/command-reference/json-output.md @@ -370,7 +370,7 @@ odo registry -o json ] ``` -Using the `--details` flag, you will also get information about the Devfile: +Using the `--details` flag with `--devfile `, you will also get information about the Devfile: ```shell odo registry --devfile java-springboot --details -o json diff --git a/docs/website/docs/command-reference/registry.md b/docs/website/docs/command-reference/registry.md index 6b737ea725d..70b543f5032 100644 --- a/docs/website/docs/command-reference/registry.md +++ b/docs/website/docs/command-reference/registry.md @@ -22,7 +22,7 @@ By default, the name, registry, description and versions of the Devfile stacks a The flags below let you change the content of the output: -* `--details` to display details about the Devfile stacks +* `--details` to display details about a specific Devfile stack (to be used only with `--devfile `) * `-o json` to output the information in a JSON format ## Running the command diff --git a/pkg/odo/cli/registry/registry.go b/pkg/odo/cli/registry/registry.go index 1bf6603efb2..c3322bf0b52 100644 --- a/pkg/odo/cli/registry/registry.go +++ b/pkg/odo/cli/registry/registry.go @@ -32,8 +32,8 @@ var Example = ` # Get all devfile components # Filter by name and devfile registry %[1]s --filter nodejs --devfile-registry DefaultDevfileRegistry -# Show more details -%[1]s --details +# Show more details from a specific devfile +%[1]s --details --devfile nodejs # Show more details from a specific devfile and registry %[1]s --details --devfile nodejs --devfile-registry DefaultDevfileRegistry` @@ -120,7 +120,7 @@ func NewCmdRegistry(name, fullName string) *cobra.Command { listCmd.Flags().StringVar(&o.filterFlag, "filter", "", "Filter based on the name or description of the component") listCmd.Flags().StringVar(&o.devfileFlag, "devfile", "", "Only the specific Devfile component") listCmd.Flags().StringVar(&o.registryFlag, "devfile-registry", "", "Only show components from the specific Devfile registry") - listCmd.Flags().BoolVar(&o.detailsFlag, "details", false, "Show details of each component") + listCmd.Flags().BoolVar(&o.detailsFlag, "details", false, "Show details of a Devfile, to be used only with --devfile") // Add a defined annotation in order to appear in the help menu odoutil.SetCommandGroup(listCmd, odoutil.MainGroup)