Print debug mode warning to stderr to avoid polluting stdout JSON output#61302
Conversation
The debug mode warning was previously printed to stdout, which broke piping of JSON responses to tools like jq. Moving it to stderr keeps stdout clean for machine-readable output.
bugraoz93
left a comment
There was a problem hiding this comment.
Changes looks good but why do we need to make this error. This is purely created for integration tests and never ever should be used in any production. We should always use keyring in production. This could break integration tests because as this is warning to also users not an error
@bugraoz93, we must allow Also we aren't making this an error, we are just printing the output to stderr instead of stdout. |
I understood that it prevents some actions. Where are those actions needed? In the case we don't use debug mode this won't be printed right? So other than integration tests, I see no further usage of insecurely saving token to a file 🤔 |
|
Thanks for explaining! I think as long as integration tests are not impacted and we haven't changed the warning should be good |
The debug mode warning was previously printed to stdout, which broke piping of JSON responses to tools like jq. Moving it to stderr keeps stdout clean for machine-readable output.