upbound / up

The @upbound CLI
Apache License 2.0
49 stars 42 forks source link

Debug flag short form does not accept an argument #547

Closed adamwg closed 3 weeks ago

adamwg commented 1 month ago

What happened?

up ctx --help says:

Flags:
...
  -d, --debug=INT                    [INSECURE] Run with debug logging. Repeat to increase verbosity. Output might contain confidential data like tokens ($UP_DEBUG).

But the argument isn't actually accepted on the short form:

% up ctx -d 9
I0531 16:28:35.234480  810385 round_trippers.go:553] GET https://api.upbound.io/v1/organizations 200 OK in 129 milliseconds
up: error: ctx.Cmd.Run(): "9" not found in: Upbound

This might be expected behavior (note that the INT doesn't show up right next to the short form in the help), but the short form of the -f flag does accept an argument (up ctx -f - works as expected)

How can we reproduce it?

Run up ctx -d 9.

What environment did it happen in?

up v0.30.0 on Linux.

adamwg commented 3 weeks ago

Closing this, since "repeat to increase verbosity" does work: up ctx -d -d -d -d -d is more verbose than just up ctx -d.