MCPcopy Index your code
hub / github.com/cli/cli / kiroResourcePath

Function kiroResourcePath

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

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