From 3f41c313ad6779fd13135ebe2893bd1e5ddafbae Mon Sep 17 00:00:00 2001 From: xushiwei Date: Sun, 11 May 2025 20:55:59 +0800 Subject: [PATCH 1/2] github api: release/asset id => int64 --- internal/github/release.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/github/release.go b/internal/github/release.go index a7ee56fa..696b82ba 100644 --- a/internal/github/release.go +++ b/internal/github/release.go @@ -24,7 +24,7 @@ import ( // ReleaseAsset represents a GitHub release asset. type ReleaseAsset struct { URL string `json:"url"` // https://api.github.com/repos/flintlib/flint/releases/assets/242245930 - ID int `json:"id"` // 242245930 + ID int64 `json:"id"` // 242245930 NodeID string `json:"node_id"` // RA_kwDOAC8YHs4OcGEq Name string `json:"name"` // flint-3.2.2.tar.gz ContentType string `json:"content_type"` // application/x-gtar @@ -38,7 +38,7 @@ type ReleaseAsset struct { // Release represents a GitHub release. type Release struct { URL string `json:"url"` // https://api.github.com/repos/flintlib/flint/releases/209285187 - ID int `json:"id"` // 209285187 + ID int64 `json:"id"` // 209285187 NodeID string `json:"node_id"` // RE_kwDOAC8YHs4MeXBD TagName string `json:"tag_name"` // v3.2.2 TargetCommitish string `json:"target_commitish"` // b8223680e38ad048355a421bf7f617bb6c5d5e12 From 26b997537f40a0a0f51de768cdc073b70e761ca0 Mon Sep 17 00:00:00 2001 From: xushiwei Date: Mon, 12 May 2025 02:26:46 +0800 Subject: [PATCH 2/2] getAppManager: rm notFoundMgs --- xtool/cppkg/command.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/xtool/cppkg/command.go b/xtool/cppkg/command.go index f18d978e..a72a986a 100644 --- a/xtool/cppkg/command.go +++ b/xtool/cppkg/command.go @@ -17,7 +17,6 @@ package cppkg import ( - "fmt" "os" "os/exec" "strings" @@ -78,14 +77,12 @@ func (p *Tool) Get(quietInstall bool) (app string, err error) { } func (p *Tool) getAppManager() (amPath string, install []string, err error) { - var notFoundMgs []string for _, install = range p.installs { am := install[0] if amPath, err = exec.LookPath(am); err == nil { return } - notFoundMgs = append(notFoundMgs, am) } - err = fmt.Errorf("app managers not found: %s: %w", strings.Join(notFoundMgs, ", "), ErrNotFound) + err = ErrNotFound return }