-
Notifications
You must be signed in to change notification settings - Fork 80
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
json output format should NOT output progress #644
Comments
This is intentional. Because the progress is printed to stderr, you can handle it separately. For example, this is how you would hide it entirely: server request-console <server> -o json 2>/dev/null I don't think an extra flag for that would make sense. |
I think it's worth adding some details about what is printed to stdout and stderr to the documentation/help page/manpage. |
This doesn't make sense IMHO. If you provide JSON output, the output should be valid JSON and nothing else (p.e. kubectl -o yaml). This is not the usual way to provide this kind of feature. I can only speak for myself but this is the first application where I am forced to do it this way. |
That's how I solved it for now, but I also never saw a solution like that. |
Another solution could be a quiet-flag (like |
It doesn't break jq. A pipe only forwards stdout by default, we considered that when we made the change. |
You're completely right; turns out it was a completely separate issue. Should I leave the issue open as a feature request nonetheless? |
Thanks for the clarification, i corrected my comment above. And thank you for considering this! |
Yes, I think the concern that you can't (easily) get error messages while ignoring stderr is still valid, so a |
## [1.42.0](v1.41.1...v1.42.0) (2024-02-01) ### Features * add global --quiet flag to hide non-error messages ([#656](#656)) ([25fcbbf](25fcbbf)), closes [#644](#644) * allow adding/removing multiple labels at once ([#665](#665)) ([919c446](919c446)), closes [#662](#662) * group subcommands in command help ([#675](#675)) ([0cb271f](0cb271f)) * **server:** remove unsupported linux32 rescue type ([#679](#679)) ([5bb0350](5bb0350)) ### Bug Fixes * refetch after creating managed certificate ([#685](#685)) ([4864553](4864553)) * **server:** fix typo in ip subcommand ([#678](#678)) ([c5e3f00](c5e3f00)) * use --poll-interval flag ([#660](#660)) ([b9328a6](b9328a6))
Close _ # 644 |
I'm sorry 😞 |
hcloud server request-console <server> -o json
now outputs not only json, but also the progress on the STDERR channel:If json is requested, only json should be in the output. Maybe add an optional
--progress
, if that feature should still be present.Issue was introduced with hcloud v1.41.
last known good is hcloud v1.40.
The text was updated successfully, but these errors were encountered: