Skip to content

fix: use GitHub API instead of curl binary for version check (#808)#810

Open
MrRealORG wants to merge 1 commit into
XiaomiMiMo:mainfrom
MrRealORG:fix/auto-0616-curl-update-channel
Open

fix: use GitHub API instead of curl binary for version check (#808)#810
MrRealORG wants to merge 1 commit into
XiaomiMiMo:mainfrom
MrRealORG:fix/auto-0616-curl-update-channel

Conversation

@MrRealORG

Copy link
Copy Markdown

Summary

Fixes #808

Root cause

v0.1.1 was released without a curl handler in latestImpl() at all. The curl handler was added in main after v0.1.1, but it spawned the curl binary which may not be installed.

Fix

Replace curl binary with GitHub REST API call using the existing HttpClient. No external binary dependency.

…iMo#808)

The curl installation method's latestImpl() spawned the curl binary to
follow GitHub releases redirect. This fails silently (text() catches
errors and returns empty string) when curl is not installed, producing
a confusing 'failed to resolve latest version from GitHub releases
redirect' error.

Replace with GitHub REST API call (GET /repos/.../releases/latest) using
the existing HttpClient, which is already available and doesn't depend on
any external binary. Parse tag_name from the JSON response.

Root cause of XiaomiMiMo#808: v0.1.1 was released without the curl handler in
latestImpl() at all, causing 'unsupported update channel: curl'. The
handler was added in main but used the curl binary. This fix makes it
robust by using HTTP.
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.

unsupported update channel: curl

1 participant