MCPcopy Create free account
hub / github.com/cli/cli / kiroResourcePath

Function kiroResourcePath

pkg/cmd/skills/install/install.go:1248–1255  ·  view source on GitHub ↗

kiroResourcePath returns a slash-separated path suitable for use in the "resources" field of a Kiro agent config. When the install directory is inside the current git repository the path is made relative to the repo root so the example works for project-scoped agent configs; otherwise the absolute i

(installDir, gitRoot string)

Source from the content-addressed store, hash-verified

1246// root so the example works for project-scoped agent configs; otherwise
1247// the absolute install path is used (e.g. for --scope user or --dir).
1248func kiroResourcePath(installDir, gitRoot string) string {
1249 if gitRoot != "" && installDir != "" {
1250 if rel, err := filepath.Rel(gitRoot, installDir); err == nil && !strings.HasPrefix(rel, "..") && !filepath.IsAbs(rel) {
1251 return filepath.ToSlash(rel)
1252 }
1253 }
1254 return filepath.ToSlash(installDir)
1255}
1256
1257// filterHiddenDirSkills applies the --allow-hidden-dirs flag logic. When the
1258// flag is set, all skills are returned with a warning. Otherwise, hidden-dir

Callers 1

printHostHintsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected