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

Function parseSkillFromOpts

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

Source from the content-addressed store, hash-verified

599}
600
601func parseSkillFromOpts(opts *InstallOptions) {
602 if opts.SkillName != "" {
603 if name, version, ok := cutLast(opts.SkillName, "@"); ok && name != "" {
604 opts.version = version
605 opts.SkillName = name
606 return
607 }
608 }
609 if opts.Pin != "" {
610 opts.version = opts.Pin
611 }
612}
613
614// cutLast splits s around the last occurrence of sep,
615// 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