(opts *InstallOptions)
| 599 | } |
| 600 | |
| 601 | func 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. |