Skip to content

Commit

Permalink
fix(registry): default to index.json
Browse files Browse the repository at this point in the history
  • Loading branch information
futrime committed Feb 7, 2023
1 parent 2968ee7 commit 9b5b673
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/registry/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ import (
// LookupAlias looks up the alias in the registry.
func LookupAlias(alias string) (string, error) {
// Get index.
resp, err := http.Get(context.RegistryURL)
indexURL := strings.TrimSuffix(context.RegistryURL, "/") + "/index.json"
resp, err := http.Get(indexURL)
if err != nil {
return "", errors.New("cannot access registry: " + context.RegistryURL)
return "", errors.New("cannot access registry: " + indexURL)
}
defer resp.Body.Close()

Expand Down

0 comments on commit 9b5b673

Please sign in to comment.