Skip to content

Support self update --output-format=json #14459

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

InSyncWithFoo
Copy link
Contributor

Summary

Resolves #14455.

self update --output-format=json outputs the result in JSON. The outputs should look like these:

{"result":"offline"}
{"result":"externally-installed"}
{"result":"multiple-installations","current":"/home/some/bin","other":"/home/some/other/bin"}
{"result":"github-rate-limit-exceeded"}
{"result":"on-latest","version":"0.7.19"}
{"result":"would-update","from":"0.7.18","to":"latest"}
{"result":"would-update","from":"0.7.18","to":"0.7.19"}
{"result":"updated","from":null,"to":"0.7.19","tag":"0.7.19"}
{"result":"updated","from":"0.7.18","to":"0.7.19","tag":"0.7.19"}

Test Plan

Unit tests.

@InSyncWithFoo InSyncWithFoo marked this pull request as draft July 4, 2025 10:09
@InSyncWithFoo
Copy link
Contributor Author

I'm not sure how to test the more important cases (on-latest, would-update, updated). Existing tests don't seem to cover them either.

@InSyncWithFoo InSyncWithFoo marked this pull request as ready for review July 4, 2025 12:34
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.

Support self update --output-format=json
1 participant