Skip to content

add --reveal to cli for v2.30.0 and later#65

Open
csteinle wants to merge 1 commit into
jamf:mainfrom
csteinle:support_cli_2_30
Open

add --reveal to cli for v2.30.0 and later#65
csteinle wants to merge 1 commit into
jamf:mainfrom
csteinle:support_cli_2_30

Conversation

@csteinle
Copy link
Copy Markdown

@csteinle csteinle commented Sep 6, 2024

Copy link
Copy Markdown
Collaborator

@dtpryce dtpryce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in a comment I would actually go with making 2.30.0 the minimum supported version which would also need:

Happy to discuss, thanks for the great contribution. Pretty much there!

Comment thread onepassword/client.py
: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(".")))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread onepassword/client.py
(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 ""
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we go with my suggestions you won't need this and can just add --reveal to every op call that requires it

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

Successfully merging this pull request may close these issues.

Cannot obtain secret fields with op 2.30.0 or later

2 participants