moonrepo / proto

A pluggable multi-language version manager.
https://moonrepo.dev/proto
MIT License
677 stars 34 forks source link

Feature request: allow proto upgrade to only check for an update but not apply it #570

Closed W1M0R closed 2 months ago

W1M0R commented 3 months ago

In some situations, a proto upgrade might fail due to the proto.exe being in use by another process.

It would be useful to still be able to check whether an update is available, without applying the update.

❯ proto upgrade --check-only
A newer version of proto is available: 0.39.1 -> 0.39.2

A variation of this could also be used for scripting purposes, by exiting with an error if proto is outdated:

❯ proto upgrade --check-outdated
(exit code 1)
Your proto version is outdated.
A newer version of proto is available: 0.39.1 -> 0.3.29

❯ proto upgrade --check-outdated
(exit code 0)
You're already on the latest version of proto!
W1M0R commented 2 months ago

Thanks @milesj! The --check and --json flags work like a charm.