ソースを参照

hotfix for registry repo name with underscores

Mohammed Nafees 4 年 前
コミット
4ef44d2f82
1 ファイル変更1 行追加1 行削除
  1. 1 1
      api/server/handlers/registry/create_repository.go

+ 1 - 1
api/server/handlers/registry/create_repository.go

@@ -43,7 +43,7 @@ func (p *RegistryCreateRepositoryHandler) ServeHTTP(w http.ResponseWriter, r *ht
 
 
 	// parse the name from the registry
 	// parse the name from the registry
 	nameSpl := strings.Split(request.ImageRepoURI, "/")
 	nameSpl := strings.Split(request.ImageRepoURI, "/")
-	repoName := nameSpl[len(nameSpl)-1]
+	repoName := strings.ReplaceAll(nameSpl[len(nameSpl)-1], "_", "-")
 
 
 	err := regAPI.CreateRepository(p.Repo(), repoName)
 	err := regAPI.CreateRepository(p.Repo(), repoName)