Skip to content

Commit

Permalink
fix: create registry cli failure (#2051)
Browse files Browse the repository at this point in the history
Signed-off-by: 张启航 <[email protected]>
  • Loading branch information
ZhangSetSail authored Nov 19, 2024
1 parent 77e41e5 commit 9a931a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builder/sources/registry/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func WrapTransport(transport http.RoundTripper, url, username, password string)
func newFromTransport(registryURL, username, password string, transport http.RoundTripper, logf LogfCallback) (*Registry, error) {
url := strings.TrimSuffix(registryURL, "/")
containsScheme := strings.HasPrefix(url, "https")
if !strings.HasPrefix(url, "https") && strings.HasPrefix(url, "http") {
if !strings.HasPrefix(url, "https") && !strings.HasPrefix(url, "http") {
url = fmt.Sprintf("http://%s", registryURL)
}

Expand Down

0 comments on commit 9a931a3

Please sign in to comment.