summaryrefslogtreecommitdiffstats
path: root/modules/repository/create.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/repository/create.go')
-rw-r--r--modules/repository/create.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/repository/create.go b/modules/repository/create.go
index 0e91a73b83..64d92eeb2d 100644
--- a/modules/repository/create.go
+++ b/modules/repository/create.go
@@ -105,7 +105,11 @@ func CreateRepository(doer, u *models.User, opts models.CreateRepoOptions) (*mod
}
}
- if stdout, err := git.NewCommand("update-server-info").
+ if err := repo.CheckDaemonExportOK(ctx); err != nil {
+ return fmt.Errorf("checkDaemonExportOK: %v", err)
+ }
+
+ if stdout, err := git.NewCommandContext(ctx, "update-server-info").
SetDescription(fmt.Sprintf("CreateRepository(git update-server-info): %s", repoPath)).
RunInDir(repoPath); err != nil {
log.Error("CreateRepository(git update-server-info) in %v: Stdout: %s\nError: %v", repo, stdout, err)