fix(install): show [dry-run] message for single-skill git install paths

handleGitInstall has two single-skill paths (subdir and non-subdir)
that always printed "✓ Installed: <name>" even in dry-run mode.
Branch on opts.DryRun to show "[dry-run] Would install: <name>" instead,
matching the multi-skill path behavior.

Fixes failing CI tests: TestInstall_Auth_HTTPSPublicWithToken,
TestInstall_RemoteGitHubSubdir_DryRun.
This commit is contained in:
Willie
2026-02-25 07:02:54 +08:00
parent 3e3cf76666
commit aeddeb9dfe
+10 -2
View File
@@ -204,7 +204,11 @@ func handleGitInstall(source *install.Source, cfg *config.Config, opts install.I
}
installSpinner.Stop()
ui.SuccessMsg("Installed: %s", skill.Name)
if opts.DryRun {
ui.Warning("[dry-run] Would install: %s", skill.Name)
} else {
ui.SuccessMsg("Installed: %s", skill.Name)
}
renderInstallWarningsWithResult("", result.Warnings, opts.AuditVerbose, result)
if !opts.DryRun {
@@ -278,7 +282,11 @@ func handleGitInstall(source *install.Source, cfg *config.Config, opts install.I
}
installSpinner.Stop()
ui.SuccessMsg("Installed: %s", skill.Name)
if opts.DryRun {
ui.Warning("[dry-run] Would install: %s", skill.Name)
} else {
ui.SuccessMsg("Installed: %s", skill.Name)
}
renderInstallWarningsWithResult("", result.Warnings, opts.AuditVerbose, result)
if !opts.DryRun {