1
0
Fork 0
forked from forgejo/forgejo

Basic process manager

This commit is contained in:
Unknown 2014-06-19 01:08:03 -04:00
parent 8d3276cab0
commit f147ad619a
10 changed files with 326 additions and 180 deletions

View file

@ -22,6 +22,7 @@ import (
qlog "github.com/qiniu/log"
"github.com/gogits/gogs/modules/log"
"github.com/gogits/gogs/modules/process"
)
const (
@ -121,7 +122,7 @@ func AddPublicKey(key *PublicKey) (err error) {
if err = ioutil.WriteFile(tmpPath, []byte(key.Content), os.ModePerm); err != nil {
return err
}
stdout, stderr, err := com.ExecCmd("ssh-keygen", "-l", "-f", tmpPath)
stdout, stderr, err := process.Exec("AddPublicKey", "ssh-keygen", "-l", "-f", tmpPath)
if err != nil {
return errors.New("ssh-keygen -l -f: " + stderr)
} else if len(stdout) < 2 {