You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
usage errors list --api-url in the Usage line when the environment sets it #201
> $env:HODEISHIELD_API_URL='http://127.0.0.1:9'; hodeishield vendors get
error: the following required arguments were not provided:
<ID>
Usage: hodeishield.exe vendors get --api-url <URL> <ID>
--api-url is optional; clap lists it because the option is bound to an environment variable that is set.
Why it matters
The Usage line suggests a required option that the person never has to type.
Acceptance criteria
The Usage line of a usage error does not list --api-url when only the environment sets it.
Not fixed in this pass: clap marks any argument bound to an environment variable as present when the variable is set, so it appears in the Usage line. Avoiding it means dropping env from --api-url and --profile and reading the variables by hand, which also changes how --help shows them. Left open.
Fixed in v0.5.1 (#204). --api-url and --profile no longer appear in the Usage: line of a usage error when only HODEISHIELD_API_URL or HODEISHIELD_PROFILE sets them. The variables work as before, an explicit flag still takes precedence, and --help still names them. A regression test covers it (usage_line_does_not_list_options_set_by_the_environment). The earlier comment saying this was not fixed no longer applies.
Activity
d0ubl3g commentedon Oct 17, 2026
Not fixed in this pass: clap marks any argument bound to an environment variable as present when the variable is set, so it appears in the Usage line. Avoiding it means dropping
envfrom--api-urland--profileand reading the variables by hand, which also changes how--helpshows them. Left open.d0ubl3g commentedon Oct 19, 2026
Fixed in v0.5.1 (#204).
--api-urland--profileno longer appear in theUsage:line of a usage error when onlyHODEISHIELD_API_URLorHODEISHIELD_PROFILEsets them. The variables work as before, an explicit flag still takes precedence, and--helpstill names them. A regression test covers it (usage_line_does_not_list_options_set_by_the_environment). The earlier comment saying this was not fixed no longer applies.