Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vault list returns vault name and ID as single value #36

Open
hortonew opened this issue Oct 10, 2023 · 0 comments
Open

vault list returns vault name and ID as single value #36

hortonew opened this issue Oct 10, 2023 · 0 comments

Comments

@hortonew
Copy link

I'm not sure if this is intentional but:

 vault list op/vaults

returns something like the following, containing vault name and vault id:

vault1 abcdef123456
vault2 zyxwvu987654
...

adding -format=json which is vault specific, not 1pass specific outputs a list of strings:

vault list --format=json op/vaults
[
  "vault1 abcdef123456", 
  "vault2 zyxwvu987654",
...
]

Is there a way to output these in a list of maps/dictionarys so parsing for the vault name to vault id mapping doesn't need to occur after listing? In the case of vaults with spaces, it's harder to use this integration because we first need to look up the vault ID and then figure out the ID of the vault.

Ideal output:

[
  {"name": "vault1", "id": "abcdef123456"},
  {"name": "vault2", "id": "zyxwvu987654"},
  ...
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant