vault
vault copied to clipboard
fix: Add error handling for CLI flag parsing with FlagSet()
Description
Various code paths in the repository depend on apiClientMeta.FlagSet() but they do not check the return value of flags.Parse(). A parse error will be hidden from the end-user and the execution continues. With this change execution fails if flags.Parse() returns an error.
This issue is more wide-spread and affects various HashiCorp Vault related repositories. Originally I noticed this in https://github.com/hashicorp/vault-plugin-auth-kubernetes/pull/202.
TODO only if you're a HashiCorp employee
Not a HashiCorp employee :-)
Fixes #29539