fix: do not append trailing slash on empty server values
This commit is contained in:
@@ -17,11 +17,15 @@ func getRegistryServerForApp(appName string) string {
|
||||
value = common.PropertyGet("registry", "--global", "server")
|
||||
}
|
||||
|
||||
value = strings.TrimSuffix(value, "/") + "/"
|
||||
if value == "hub.docker.com/" || value == "docker.io/" {
|
||||
value = strings.TrimSuffix(value, "/")
|
||||
if value == "hub.docker.com" || value == "docker.io" {
|
||||
value = ""
|
||||
}
|
||||
|
||||
if value != "" {
|
||||
value = value + "/"
|
||||
}
|
||||
|
||||
return value
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user