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

Function kiroResourcePath

pkg/cmd/skills/install/install.go:1247–1254  ·  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

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