add --reveal to cli for v2.30.0 and later#65
Conversation
dtpryce
left a comment
There was a problem hiding this comment.
As mentioned in a comment I would actually go with making 2.30.0 the minimum supported version which would also need:
- README updated to reflect this
- updated to reflect this
1password-client/install_op.py
Line 8 in 2331849
- testing to make sure all methods work with new client (follow basic steps in README is enough for me)
Happy to discuss, thanks for the great contribution. Pretty much there!
| :param account: 1Password account name (Optional, default=None) | ||
| :param password: password of 1Password account (Optional, default=None) | ||
| """ | ||
| cli_version = tuple(map(int, read_bash_return("op --version").split("."))) |
There was a problem hiding this comment.
We actually try not to do this and just fix the version in the install.py it gave us a lot more headaches trying to be fully backwards compatible and so we try to maintain and bump when we can. I know we suggest you can have any version over 2.0.0 in the README but if this new flag is a break change, let's update that suggestion :D
| (Optional, default=None which means all fields returned) | ||
| :return: Dictionary of the item with requested fields | ||
| """ | ||
| reveal = "--reveal" if cls.cli_version >= (2, 30, 0) else "" |
There was a problem hiding this comment.
If we go with my suggestions you won't need this and can just add --reveal to every op call that requires it
--revealwhen getting items if CLI is version v2.30.0 or later