Install portable agent-neutral Hop skill and documentation
Hop-State: A_06FN69X2VW0BAXG4A4DT6V0 Hop-Proposal: R_06FN69VET1STZNKPWK913K8 Hop-Task: T_06FN637799RW5Q7WH9H6PJR Hop-Attempt: AT_06FN63779BJRBK1VFQ94GRR
This commit is contained in:
+10
-2
@@ -528,14 +528,22 @@ func runSkillCLI(args []string, jsonOutput bool, stdout, stderr io.Writer) int {
|
||||
if err := fs.Parse(args[1:]); err != nil || len(fs.Args()) != 0 {
|
||||
return 2
|
||||
}
|
||||
result, err := InstallSkill(*path, *force)
|
||||
var result SkillInstallResult
|
||||
var err error
|
||||
if strings.TrimSpace(*path) == "" {
|
||||
result, err = InstallDefaultSkills(*force)
|
||||
} else {
|
||||
result, err = InstallSkill(*path, *force)
|
||||
}
|
||||
if err != nil {
|
||||
return printCLIError(err, jsonOutput, stdout, stderr)
|
||||
}
|
||||
if jsonOutput {
|
||||
writeJSON(stdout, map[string]any{"ok": true, "data": result})
|
||||
} else {
|
||||
fmt.Fprintf(stdout, "Installed Hop skill at %s\n", result.Path)
|
||||
for _, installedPath := range result.Paths {
|
||||
fmt.Fprintf(stdout, "Installed Hop skill at %s\n", installedPath)
|
||||
}
|
||||
}
|
||||
return 0
|
||||
case "print":
|
||||
|
||||
Reference in New Issue
Block a user