peopledoc/vault-cli

Parse error when setting a variable

linoor opened this issue · 4 comments

I'm getting en error Error: no such option: -----BEGIN PRIVATE KEY----- when trying to set a variable. I'm guessing it's because it's trying to parse a string starting with ----- as some option to the script.

To reproduce:
vault set sae_private_crt_key "-----asd"

For complicated variables, try to set them via stdin (--stdin)

$ vault set --stdin sae_private_crt_key
-----BEGIN PRIVATE KEY-----
bla
-----END PRIVATE KEY-----
(ctrl+d)

Also, 2 dashes to indicate the end of the CLI flags should help vault-cli: vault set sae_private_crt_key -- -----BEGIN PRIVATE KEY-----... should work too.

cool, thanks! I'm closing the ticket then. 👍