cli icon indicating copy to clipboard operation
cli copied to clipboard

fix: `--debug` is sometimes not applied

Open apricote opened this issue 1 year ago • 1 comments

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

apricote avatar Aug 16 '24 08:08 apricote

I'm not sure what causes this. It might be a Cobra issue.

phm07 avatar Sep 06 '24 10:09 phm07

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.

github-actions[bot] avatar Dec 05 '24 13:12 github-actions[bot]

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

jooola avatar Apr 01 '25 12:04 jooola