You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the list command(and others it seems) always print the warning.
This makes it very hard to programatically do things based on for instance json output, since the json output is not valid json due to the warning that is always printed, introducing parsing logic for the warning before working with the json output.
➜ k8s git:(main) ✗ dapr list -k --namespace default -o json
⚠ In future releases, this command will only query the "default" namespace by default. Please use the --namespace flag for a specific namespace, or the --all-namespaces (-A) flag for all namespaces.
{
"namespace": "default",
"appId": "bakery",
"appPort": "8080",
"age": "16h",
"created": "2022-06-29 18:01.58"
}
SyntaxError: Unexpected token ⚠ in JSON at position 0
Suggestion: If namespace is provided to the command, or json output requested, disable the warning from printing.
Or add a flag to disable the warning (--no-warning) or similar.
print.WarningStatusEvent(os.Stdout, "In future releases, this command will only query the \"default\" namespace by default. Please use the --namespace flag for a specific namespace, or the --all-namespaces (-A) flag for all namespaces.")
The text was updated successfully, but these errors were encountered:
@MichaelHindley I think warnings should be printed in STDERR ... Thereby if only STDOUT is read, only the output will be there ....
Also for flag, this is too specific to this warning ... I am thinking it should probably be some form of a well known flag name like --quiet or --silent and that it should apply to all commands globally in dapr CLI ... @yaron2 Thoughts?
When using the list command(and others it seems) always print the warning.
This makes it very hard to programatically do things based on for instance json output, since the json output is not valid json due to the warning that is always printed, introducing parsing logic for the warning before working with the json output.
SyntaxError: Unexpected token ⚠ in JSON at position 0
Suggestion: If namespace is provided to the command, or json output requested, disable the warning from printing.
Or add a flag to disable the warning (--no-warning) or similar.
cli/cmd/list.go
Line 81 in ce0af7c
The text was updated successfully, but these errors were encountered: