Update modules/repository/license.go

Co-authored-by: delvh <dev.lh@web.de>
This commit is contained in:
yp05327 2023-12-01 08:54:41 +09:00 committed by GitHub
parent 9178d90a5f
commit 093e71d4be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -189,6 +189,7 @@ func UpdateRepoLicensesByGitRepo(ctx context.Context, repo *repo_model.Repositor
if gitRepo == nil {
var err error
gitRepo, err = git.OpenRepository(ctx, repo.RepoPath())
defer gitRepo.close()
if err != nil {
return fmt.Errorf("OpenRepository: %w", err)
}