diff options
author | Unknown <joe2010xtmf@163.com> | 2014-06-19 01:08:03 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-06-19 01:08:03 -0400 |
commit | f147ad619a68440ef6c30d797a8217e687e8d51d (patch) | |
tree | 0f32ea8c645b514e47482d92b59de5a852306674 /models/publickey.go | |
parent | 8d3276cab0bb554d63a38ddf3d065f247cf9b3d8 (diff) | |
download | gitea-f147ad619a68440ef6c30d797a8217e687e8d51d.tar.gz gitea-f147ad619a68440ef6c30d797a8217e687e8d51d.zip |
Basic process manager
Diffstat (limited to 'models/publickey.go')
-rw-r--r-- | models/publickey.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/models/publickey.go b/models/publickey.go index 76dc0cc740..72b45c5b89 100644 --- a/models/publickey.go +++ b/models/publickey.go @@ -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 { |