From bc9b3d1eb2f31467a93405aa4d6f1e6a37e0d13a Mon Sep 17 00:00:00 2001 From: chenbaowang <49091147+Rsweater@users.noreply.github.com> Date: Fri, 24 Apr 2026 11:39:54 +0800 Subject: [PATCH] fix(cli): rename loop variable to avoid conflict with info function --- skillhub-cli/src/commands/update.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/skillhub-cli/src/commands/update.ts b/skillhub-cli/src/commands/update.ts index c37d4787f..c0ec3eae7 100644 --- a/skillhub-cli/src/commands/update.ts +++ b/skillhub-cli/src/commands/update.ts @@ -202,14 +202,14 @@ export function registerUpdate(program: Command) { let updated = 0; let failed = 0; - for (const info of skillsToUpdate) { + for (const skill of skillsToUpdate) { try { - info(`Updating ${info.name} from ${info.currentVersion} to ${info.latestVersion}...`); - const cmd = `${cliCmd} install ${info.namespace}/${info.slug} --skill-version ${info.latestVersion} ${scope}`.trim(); + info(`Updating ${skill.name} from ${skill.currentVersion} to ${skill.latestVersion}...`); + const cmd = `${cliCmd} install ${skill.namespace}/${skill.slug} --skill-version ${skill.latestVersion} ${scope}`.trim(); execSync(cmd, { stdio: "inherit" }); updated++; } catch (e: any) { - error(`Failed to update ${info.name}: ${e.message}`); + error(`Failed to update ${skill.name}: ${e.message}`); failed++; } }