cli
cli copied to clipboard
fix: `--debug` is sometimes not applied
TL;DR
--debug is sometimes not applied when passed in late in the arguments.
Expected behavior
--debug should work, no matter at what position in the argument list it is being passed.
Observed behavior
On some subcommands, --debug needs to be passed early to work. I did not find a pattern to this.
- :heavy_check_mark:
hcloud --debug server attach-to-network --network foo bar - :heavy_check_mark:
hcloud server --debug attach-to-network --network foo bar - :heavy_check_mark:
hcloud server attach-to-network --debug --network foo bar - :x:
hcloud server attach-to-network --network foo --debug bar - :x:
hcloud server attach-to-network --network foo bar --debug
Minimal working example
No response
Log output
No response
Additional information
$ hcloud version
hcloud 1.45.0-dev
I'm not sure what causes this. It might be a Cobra issue.
This issue has been marked as stale because it has not had recent activity. The bot will close the issue if no further action occurs.
I am having the same problem with the context flag:
$ hcloud config get token --allow-sensitive --context hc-personal
# Nope
$ hcloud --context hc-personal config get token --allow-sensitive
# Yup