How to detect programmatically there is an update available?

Tieske
Tieske
Community Member

I'm using some scripts, and would like to print a warning to the users when an update is available.

Yet the op update just prints an arbitrary message that is hard to parse and changes (recently url was removed)

So how can I make this work, or alternatively can the output be adjusted by an extra flag? E.g. a --plain flag that only outputs the newer version if available, and nothing if running latest?


1Password Version: 0.5.5
Extension Version: Not Provided
OS Version: OS X
Sync Type: Not Provided

Comments

  • cohix
    cohix
    1Password Alumni

    You're correct that there is no "clean" way to do this. I'm thinking that maybe the exit code is the right way to do this? For example, 0 would indicate no update available, and 1 to indicate that an update is available? Do you think that would suit your needs?

This discussion has been closed.