Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not hide --output Flag in help #4656

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cli/azd/cmd/testdata/TestUsage-azd-auth-login.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Flags
--client-secret string : The client secret for the service principal to authenticate with. Set to the empty string to read the value from the console.
--federated-credential-provider string : The provider to use to acquire a federated token to authenticate with.
--managed-identity : Use a managed identity to authenticate.
-o, --output string : The output format (the supported formats are json, none).
--redirect-port int : Choose the port to be used as part of the redirect URI during interactive login.
--tenant-id string : The tenant id or domain name to authenticate with.
--use-device-code : When true, log in by using a device code instead of a browser.
Expand Down
3 changes: 3 additions & 0 deletions cli/azd/cmd/testdata/TestUsage-azd-config-get.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Gets a configuration.
Usage
azd config get <path> [flags]

Flags
-o, --output string : The output format (the supported formats are json).

Global Flags
-C, --cwd string : Sets the current working directory.
--debug : Enables debugging and diagnostics logging.
Expand Down
3 changes: 3 additions & 0 deletions cli/azd/cmd/testdata/TestUsage-azd-config-show.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Show all the configuration values.
Usage
azd config show [flags]

Flags
-o, --output string : The output format (the supported formats are json).

Global Flags
-C, --cwd string : Sets the current working directory.
--debug : Enables debugging and diagnostics logging.
Expand Down
1 change: 1 addition & 0 deletions cli/azd/cmd/testdata/TestUsage-azd-deploy.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Flags
--all : Deploys all services that are listed in azure.yaml
-e, --environment string : The name of the environment to use.
--from-package string : Deploys the packaged service located at the provided path. Supports zipped file packages (file path) or container images (image tag).
-o, --output string : The output format (the supported formats are json, none).

Global Flags
-C, --cwd string : Sets the current working directory.
Expand Down
1 change: 1 addition & 0 deletions cli/azd/cmd/testdata/TestUsage-azd-down.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Usage
Flags
-e, --environment string : The name of the environment to use.
--force : Does not require confirmation before it deletes resources.
-o, --output string : The output format (the supported formats are json, none).
--purge : Does not require confirmation before it permanently deletes resources that are soft-deleted by default (for example, key vaults).

Global Flags
Expand Down
1 change: 1 addition & 0 deletions cli/azd/cmd/testdata/TestUsage-azd-env-get-values.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Usage

Flags
-e, --environment string : The name of the environment to use.
-o, --output string : The output format (the supported formats are json, dotenv).

Global Flags
-C, --cwd string : Sets the current working directory.
Expand Down
3 changes: 3 additions & 0 deletions cli/azd/cmd/testdata/TestUsage-azd-env-list.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ List environments.
Usage
azd env list [flags]

Flags
-o, --output string : The output format (the supported formats are json, table).

Global Flags
-C, --cwd string : Sets the current working directory.
--debug : Enables debugging and diagnostics logging.
Expand Down
1 change: 1 addition & 0 deletions cli/azd/cmd/testdata/TestUsage-azd-env-refresh.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Usage
Flags
-e, --environment string : The name of the environment to use.
--hint string : Hint to help identify the environment to refresh
-o, --output string : The output format (the supported formats are json, none).

Global Flags
-C, --cwd string : Sets the current working directory.
Expand Down
1 change: 1 addition & 0 deletions cli/azd/cmd/testdata/TestUsage-azd-infra-synth.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Usage
Flags
-e, --environment string : The name of the environment to use.
--force : Overwrite any existing files without prompting
-o, --output string : The output format (the supported formats are none).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a negative UX impact -- we're offering a flag that doesn't change the behavior of the command.


Global Flags
-C, --cwd string : Sets the current working directory.
Expand Down
1 change: 1 addition & 0 deletions cli/azd/cmd/testdata/TestUsage-azd-package.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Usage
Flags
--all : Packages all services that are listed in azure.yaml
-e, --environment string : The name of the environment to use.
-o, --output string : The output format (the supported formats are json, none).
--output-path string : File or folder path where the generated packages will be saved.

Global Flags
Expand Down
1 change: 1 addition & 0 deletions cli/azd/cmd/testdata/TestUsage-azd-provision.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Usage
Flags
-e, --environment string : The name of the environment to use.
--no-state : Do not use latest Deployment State (bicep only).
-o, --output string : The output format (the supported formats are json, none).
--preview : Preview changes to Azure resources.

Global Flags
Expand Down
1 change: 1 addition & 0 deletions cli/azd/cmd/testdata/TestUsage-azd-restore.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Usage
Flags
--all : Restores all services that are listed in azure.yaml
-e, --environment string : The name of the environment to use.
-o, --output string : The output format (the supported formats are json, none).

Global Flags
-C, --cwd string : Sets the current working directory.
Expand Down
1 change: 1 addition & 0 deletions cli/azd/cmd/testdata/TestUsage-azd-show.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Usage

Flags
-e, --environment string : The name of the environment to use.
-o, --output string : The output format (the supported formats are json, none).
--show-secrets : Unmask secrets in output.

Global Flags
Expand Down
1 change: 1 addition & 0 deletions cli/azd/cmd/testdata/TestUsage-azd-template-list.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Usage

Flags
-f, --filter strings : The tag(s) used to filter template results. Supports comma-separated values.
-o, --output string : The output format (the supported formats are json, table).
-s, --source string : Filters templates by source.

Global Flags
Expand Down
3 changes: 3 additions & 0 deletions cli/azd/cmd/testdata/TestUsage-azd-template-show.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Show details for a given template. (Beta)
Usage
azd template show <template> [flags]

Flags
-o, --output string : The output format (the supported formats are json, none).

Global Flags
-C, --cwd string : Sets the current working directory.
--debug : Enables debugging and diagnostics logging.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Usage
Flags
-l, --location string : Location of the template source. Required when using type flag.
-n, --name string : Display name of the template source.
-o, --output string : The output format (the supported formats are none).
-t, --type string : Kind of the template source. Supported types are 'file', 'url' and 'gh'.

Global Flags
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Lists the configured azd template sources. (Beta)
Usage
azd template source list [flags]

Flags
-o, --output string : The output format (the supported formats are json, table).

Global Flags
-C, --cwd string : Sets the current working directory.
--debug : Enables debugging and diagnostics logging.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Removes the specified azd template source (Beta)
Usage
azd template source remove <key> [flags]

Flags
-o, --output string : The output format (the supported formats are none).

Global Flags
-C, --cwd string : Sets the current working directory.
--debug : Enables debugging and diagnostics logging.
Expand Down
1 change: 1 addition & 0 deletions cli/azd/cmd/testdata/TestUsage-azd-up.snap
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Usage

Flags
-e, --environment string : The name of the environment to use.
-o, --output string : The output format (the supported formats are json, none).

Global Flags
-C, --cwd string : Sets the current working directory.
Expand Down
3 changes: 3 additions & 0 deletions cli/azd/cmd/testdata/TestUsage-azd-version.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Print the version number of Azure Developer CLI.
Usage
azd version [flags]

Flags
-o, --output string : The output format (the supported formats are json, none).

Global Flags
-C, --cwd string : Sets the current working directory.
--debug : Enables debugging and diagnostics logging.
Expand Down
2 changes: 1 addition & 1 deletion cli/azd/pkg/output/parameter.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func AddOutputFlag(f *pflag.FlagSet, s *string, supportedFormats []Format, defau
description := fmt.Sprintf("The output format (the supported formats are %s).", strings.Join(formatNames, ", "))
f.StringVarP(s, outputFlagName, "o", string(defaultFormat), description)
//preview:flag hide --output
_ = f.MarkHidden(outputFlagName)
// _ = f.MarkHidden(outputFlagName)

// Only error that can occur is "flag not found", which is not possible given we just added the flag on the previous line
_ = f.SetAnnotation(outputFlagName, supportedFormatterAnnotation, formatNames)
Expand Down
Loading