fix: update icon URLs

This commit is contained in:
Michael Smith 2025-04-16 15:22:13 +00:00
parent e6efd71fca
commit d2ebc2b1d9
5 changed files with 8 additions and 7 deletions

View File

@ -87,9 +87,9 @@ func validateCoderResourceIconURL(iconURL string) []error {
// repo, and where this logic will run // repo, and where this logic will run
isPermittedRelativeURL := strings.HasPrefix(iconURL, "./") || isPermittedRelativeURL := strings.HasPrefix(iconURL, "./") ||
strings.HasPrefix(iconURL, "/") || strings.HasPrefix(iconURL, "/") ||
strings.HasPrefix(iconURL, "../../../.logos") strings.HasPrefix(iconURL, "../../../.icons")
if !isPermittedRelativeURL { if !isPermittedRelativeURL {
problems = append(problems, errors.New("relative icon URL must either be scoped to that module's directory, or the top-level /.logos directory")) problems = append(problems, fmt.Errorf("relative icon URL %q must either be scoped to that module's directory, or the top-level /.icons directory (this can usually be done by starting the path with \"../../../.icons\")", iconURL))
} }
return problems return problems

View File

@ -172,9 +172,9 @@ func main() {
} }
fmt.Println("---") fmt.Println("---")
fmt.Println("Encountered the following problems") log.Println("Encountered the following problems")
for _, err := range readmeValidationErrors { for _, err := range readmeValidationErrors {
log.Println(err) fmt.Println(err)
} }
os.Exit(1) os.Exit(1)
} }

View File

@ -97,7 +97,7 @@ func validateRepoStructure() error {
problems = append(problems, errs...) problems = append(problems, errs...)
} }
_, err := os.Stat("./.logos") _, err := os.Stat("./.icons")
if err != nil { if err != nil {
problems = append(problems, err) problems = append(problems, err)
} }

View File

@ -1,7 +1,8 @@
--- ---
display_name: Claude Code display_name: Claude Code
description: Run Claude Code in your workspace description: Run Claude Code in your workspace
icon: ../.icons/claude.svg icon: ../../../.icons/claude.svg
maintainer_github: coder
verified: true verified: true
tags: [agent, claude-code] tags: [agent, claude-code]
--- ---

View File

@ -1,7 +1,7 @@
--- ---
display_name: Cursor IDE display_name: Cursor IDE
description: Add a one-click button to launch Cursor IDE description: Add a one-click button to launch Cursor IDE
icon: ../.icons/cursor.svg icon: ../../../.icons/cursor.svg
verified: true verified: true
tags: [ide, cursor, helper] tags: [ide, cursor, helper]
--- ---