diff options
Diffstat (limited to 'modules/repository/generate.go')
-rw-r--r-- | modules/repository/generate.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/repository/generate.go b/modules/repository/generate.go index 1ba457fb3a..a7adce4d02 100644 --- a/modules/repository/generate.go +++ b/modules/repository/generate.go @@ -275,5 +275,16 @@ func GenerateRepository(ctx models.DBContext, doer, owner *models.User, template return generateRepo, err } + if err = generateRepo.CheckDaemonExportOKCtx(ctx); err != nil { + return generateRepo, fmt.Errorf("checkDaemonExportOK: %v", err) + } + + if stdout, err := git.NewCommand("update-server-info"). + SetDescription(fmt.Sprintf("GenerateRepository(git update-server-info): %s", repoPath)). + RunInDir(repoPath); err != nil { + log.Error("GenerateRepository(git update-server-info) in %v: Stdout: %s\nError: %v", generateRepo, stdout, err) + return generateRepo, fmt.Errorf("error in GenerateRepository(git update-server-info): %v", err) + } + return generateRepo, nil } |