When passing a binary executed with aws-vault exec long options, it seems that they are not properly passed to the executable:
$ aws-vault exec some_profile awless --format csv buckets
aws-vault: error: unknown long flag '--format', try --help
As you can see in the above example, the --format flag should be passed to awless and not be consumed by aws-vault.
@jottr the execution is wrong, it should have been:
aws-vault exec some_profile -- awless --format csv buckets
See the missing -- , thats how almost all bash ones needs to be passed.
Maybe this should be added to aws-vault exec --help?
I simply forgot that this using -- was a requirement to separate the commands.
I bet I'm not the first person who was stumped by this.
For future reference, the double dash is documented in the POSIX guidelines:
Guideline 10:
The first -- argument that is not an option-argument should be accepted as a delimiter indicating the end of options. Any following arguments should be treated as operands, even if they begin with the '-' character.
Glad you got it fixed.
Most helpful comment
Maybe this should be added to
aws-vault exec --help?I simply forgot that this using
--was a requirement to separate the commands.I bet I'm not the first person who was stumped by this.
For future reference, the double dash is documented in the POSIX guidelines: