Comments (11)
Yes, I think the concern that you can't (easily) get error messages while ignoring stderr is still valid, so a --quiet
flag is still useful IMO. Thanks for bringing this up for discussion 🙂
from cli.
I think it's worth adding some details about what is printed to stdout and stderr to the documentation/help page/manpage.
from cli.
This is intentional. Because the progress is printed in stderr, you can handle it separately. For example, this is how you would hide it entirely:
server request-console -o json 2>/dev/null
I don't think an extra flag for that would make sense.
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. This breaks tools like jq
which normally would be piped without the need to redirect stderr to /dev/null...
I can only speak for myself but this is the first application where I am forced to do it this way.
from cli.
This is intentional. Because the progress is printed in stderr, you can handle it separately. For example, this is how you would hide it entirely:
server request-console -o json 2>/dev/null
I don't think an extra flag for that would make sense.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. This breaks tools like
jq
which normally would be piped without the need to redirect stderr to /dev/null...I can only speak for myself but this is the first application where I am forced to do it this way.
It doesn't break jq. A pipe only forwards stdout by default, we considered that when we made the change.
Only problem I see so far is that you can't distinguish errors (which are printed to stderr too) from the progress bar output. So I think a --quiet
(opt-out) or --progress
(opt-in) could be useful indeed.
from cli.
It doesn't break jq. A pipe only forwards stdout by default, we considered that when we made the change. Only problem I see so far is that you can't distinguish errors (which are printed to stderr too) from the progress bar output. So I think a
--quiet
(opt-out) or--progress
(opt-in) could be useful indeed.
Thanks for the clarification, i corrected my comment above. And thank you for considering this!
from cli.
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.
from cli.
This is intentional. Because the progress is printed in stderr, you can handle it separately. For example, this is how you would hide it entirely:
That's how I solved it for now, but I also never saw a solution like that.
I'd rather see a commandline flag instead.
from cli.
This is intentional. Because the progress is printed in stderr, you can handle it separately. For example, this is how you would hide it entirely:
server request-console -o json 2>/dev/null
I don't think an extra flag for that would make sense.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. This breaks tools like
jq
which normally would be piped without the need to redirect stderr to /dev/null...I can only speak for myself but this is the first application where I am forced to do it this way.
Another solution could be a quiet-flag (like curl -s
). If this is passed, we can ensure, that script-friendly output is generated.
from cli.
You're completely right; turns out it was a completely separate issue. Should I leave the issue open as a feature request nonetheless?
from cli.
hcloud server request-console <server> -o json
now outputs not only json, but also the progress on the STDERR channel:$ hcloud server request-console <server> -o json 1.1s [===================================] 100.00% { "wss_url": "wss://web-console.hetzner.cloud/?server_id=<server_id>\u0026token=<token>", "password": "<password>" }
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.
Close _ # 644
from cli.
I'm sorry 😞
from cli.
Related Issues (20)
- Add the project name to the hcloud cmd "all" HOT 2
- Improve error message when required argument is not set HOT 2
- Primary IP assignee ID is null in API response but 0 in JSON output HOT 1
- Update Loadbalancer SSL Certificate HOT 4
- Improve commands help messages
- Please enable yaml output for server reset-password HOT 6
- Adding firewall rule fails with version v1.43.0 HOT 3
- enabling rescue mode using CLI HOT 1
- alias lb for load-balancer HOT 2
- hcloud server ssh <server> [command] is broken HOT 1
- `--port` option is missing from usage of the `firewall {add,delete}-rule` commands HOT 2
- Allow to set health check options in `hcloud load-balancer add-service`
- Example firewall rules json doesn't work HOT 1
- Load-Balancer: Assign Targets using labels does not seem to work HOT 2
- [Design Doc] feat: new configuration system + config subcommand
- bug: debug log is truncated if it already exists
- Progress animation is rendered on a new line when the terminal is too small HOT 1
- feat: Limit parallel deletes HOT 1
- SSH options in hcloud server ssh HOT 5
- Deleting protected resources fails quietly HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cli.