Skip to content

Commit 867a1ce

Browse files
authored
Merge pull request #1108 from xushiwei/q
github api: release/asset id => int64
2 parents 10d603b + 26b9975 commit 867a1ce

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

internal/github/release.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
// ReleaseAsset represents a GitHub release asset.
2525
type ReleaseAsset struct {
2626
URL string `json:"url"` // https://api.github.com/repos/flintlib/flint/releases/assets/242245930
27-
ID int `json:"id"` // 242245930
27+
ID int64 `json:"id"` // 242245930
2828
NodeID string `json:"node_id"` // RA_kwDOAC8YHs4OcGEq
2929
Name string `json:"name"` // flint-3.2.2.tar.gz
3030
ContentType string `json:"content_type"` // application/x-gtar
@@ -38,7 +38,7 @@ type ReleaseAsset struct {
3838
// Release represents a GitHub release.
3939
type Release struct {
4040
URL string `json:"url"` // https://api.github.com/repos/flintlib/flint/releases/209285187
41-
ID int `json:"id"` // 209285187
41+
ID int64 `json:"id"` // 209285187
4242
NodeID string `json:"node_id"` // RE_kwDOAC8YHs4MeXBD
4343
TagName string `json:"tag_name"` // v3.2.2
4444
TargetCommitish string `json:"target_commitish"` // b8223680e38ad048355a421bf7f617bb6c5d5e12

xtool/cppkg/command.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
package cppkg
1818

1919
import (
20-
"fmt"
2120
"os"
2221
"os/exec"
2322
"strings"
@@ -78,14 +77,12 @@ func (p *Tool) Get(quietInstall bool) (app string, err error) {
7877
}
7978

8079
func (p *Tool) getAppManager() (amPath string, install []string, err error) {
81-
var notFoundMgs []string
8280
for _, install = range p.installs {
8381
am := install[0]
8482
if amPath, err = exec.LookPath(am); err == nil {
8583
return
8684
}
87-
notFoundMgs = append(notFoundMgs, am)
8885
}
89-
err = fmt.Errorf("app managers not found: %s: %w", strings.Join(notFoundMgs, ", "), ErrNotFound)
86+
err = ErrNotFound
9087
return
9188
}

0 commit comments

Comments
 (0)