vault icon indicating copy to clipboard operation
vault copied to clipboard

fix: Add error handling for CLI flag parsing with FlagSet()

Open thevilledev opened this issue 1 year ago • 0 comments

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

thevilledev avatar Oct 11 '24 19:10 thevilledev