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

Function parseSkillFromOpts

pkg/cmd/skills/install/install.go:588–599  ·  view source on GitHub ↗
(opts *InstallOptions)

Source from the content-addressed store, hash-verified

586}
587
588func parseSkillFromOpts(opts *InstallOptions) {
589 if opts.SkillName != "" {
590 if name, version, ok := cutLast(opts.SkillName, "@"); ok && name != "" {
591 opts.version = version
592 opts.SkillName = name
593 return
594 }
595 }
596 if opts.Pin != "" {
597 opts.version = opts.Pin
598 }
599}
600
601// cutLast splits s around the last occurrence of sep,
602// returning the text before and after sep, and whether sep was found.

Callers 1

installRunFunction · 0.85

Calls 1

cutLastFunction · 0.85

Tested by

no test coverage detected