Browse Source

bug fixed

for-closed-social
Lunny Xiao 10 years ago
parent
commit
3d1a967477
2 changed files with 12 additions and 2 deletions
  1. +7
    -0
      models/repo.go
  2. +5
    -2
      serve.go

+ 7
- 0
models/repo.go View File

@ -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)
}

+ 5
- 2
serve.go View File

@ -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)
}
}
}

Loading…
Cancel
Save