diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2014-03-23 19:53:50 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2014-03-23 19:53:50 +0800 |
commit | 3d1a967477dd8245dabee6f9f8feb3c1c3924fc3 (patch) | |
tree | 90affe09fc04c57c5bd6eaf6d7ee88ee55380eef | |
parent | 2dd5259f8e499b0749ecb21faa5e6ad1acb39ff7 (diff) | |
download | gitea-3d1a967477dd8245dabee6f9f8feb3c1c3924fc3.tar.gz gitea-3d1a967477dd8245dabee6f9f8feb3c1c3924fc3.zip |
bug fixed
-rw-r--r-- | models/repo.go | 7 | ||||
-rw-r--r-- | serve.go | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/models/repo.go b/models/repo.go index a37923c8b1..eafb12f471 100644 --- a/models/repo.go +++ b/models/repo.go @@ -10,6 +10,7 @@ import ( "fmt" "io/ioutil" "os" + "os/exec" "path" "path/filepath" "regexp" @@ -198,6 +199,12 @@ func CreateRepository(user *User, repoName, desc, repoLang, license string, priv return nil, err } + c := exec.Command("git", "update-server-info") + err = c.Run() + if err != nil { + log.Error("repo.CreateRepository(exec update-server-info): %v", err) + } + return repo, NewRepoAction(user, repo) } @@ -280,7 +280,10 @@ func runServ(k *cli.Context) { //fmt.Println("...", cmd) //runUpdate(k) - c := exec.Command("exec", "git", "update-server-info") - c.Run() + c := exec.Command("git", "update-server-info") + err := c.Run() + if err != nil { + log.Error("update-server-info: %v", err) + } } } |