Skip to content

Commit 7cc1b0c

Browse files
committed
Fix slice aliasing in update result formatting
Co-authored-by: Isaac
1 parent 194ded3 commit 7cc1b0c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

experimental/aitools/lib/installer/update.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ func UpdateSkills(ctx context.Context, src ManifestSource, targetAgents []*agent
147147
}
148148

149149
// Download and install updated/added skills.
150-
allChanges := append(result.Updated, result.Added...)
150+
allChanges := make([]SkillUpdate, 0, len(result.Updated)+len(result.Added))
151+
allChanges = append(allChanges, result.Updated...)
152+
allChanges = append(allChanges, result.Added...)
151153
for _, change := range allChanges {
152154
meta := manifest.Skills[change.Name]
153155
if err := installSkillForAgents(ctx, latestTag, change.Name, meta.Files, targetAgents, globalDir); err != nil {

0 commit comments

Comments
 (0)