Skip to content

Commit e201d08

Browse files
committed
fix: avoid duplicate https://github.com/ prefix in skill URL
1 parent 970891e commit e201d08

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cmd/install.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,12 @@ func installSingleSkill(input string, global bool, agents []string) error {
452452
URL: repoURL,
453453
}
454454
if subDir != "" {
455-
skillInfo.URL = fmt.Sprintf("https://github.com/%s", input)
455+
// Avoid duplicating https://github.com/ prefix
456+
if strings.HasPrefix(input, "https://") || strings.HasPrefix(input, "http://") {
457+
skillInfo.URL = input
458+
} else {
459+
skillInfo.URL = fmt.Sprintf("https://github.com/%s", input)
460+
}
456461
}
457462

458463
cfg.AddSkillInfo(skillInfo)

0 commit comments

Comments
 (0)