Skip to content

Commit e0166f7

Browse files
committed
fix: replace FetchLatestRelease with GetSkillsRef in list command
FetchLatestRelease was removed in the PR3 squash-merge. Use GetSkillsRef(ctx) to get the skills repo ref instead. Co-authored-by: Isaac
1 parent f718f02 commit e0166f7

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

experimental/aitools/cmd/list.go

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,10 @@ func newListCmd() *cobra.Command {
3232
func defaultListSkills(cmd *cobra.Command) error {
3333
ctx := cmd.Context()
3434

35-
src := &installer.GitHubManifestSource{}
36-
latestTag, _, err := src.FetchLatestRelease(ctx)
37-
if err != nil {
38-
return fmt.Errorf("failed to fetch latest release: %w", err)
39-
}
35+
ref := installer.GetSkillsRef(ctx)
4036

41-
manifest, err := src.FetchManifest(ctx, latestTag)
37+
src := &installer.GitHubManifestSource{}
38+
manifest, err := src.FetchManifest(ctx, ref)
4239
if err != nil {
4340
return fmt.Errorf("failed to fetch manifest: %w", err)
4441
}
@@ -60,7 +57,7 @@ func defaultListSkills(cmd *cobra.Command) error {
6057
}
6158
sort.Strings(names)
6259

63-
version := strings.TrimPrefix(latestTag, "v")
60+
version := strings.TrimPrefix(ref, "v")
6461
cmdio.LogString(ctx, "Available skills (v"+version+"):")
6562
cmdio.LogString(ctx, "")
6663

0 commit comments

Comments
 (0)