mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-24 17:35:43 +00:00
fix #659
This commit is contained in:
parent
54d25c13d7
commit
515641d033
11
cmd/fix.go
11
cmd/fix.go
|
@ -14,6 +14,7 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/Unknwon/com"
|
||||||
"github.com/codegangsta/cli"
|
"github.com/codegangsta/cli"
|
||||||
|
|
||||||
"github.com/gogits/gogs/models"
|
"github.com/gogits/gogs/models"
|
||||||
|
@ -164,10 +165,12 @@ func runFixLocation(ctx *cli.Context) {
|
||||||
|
|
||||||
// Fix in authorized_keys file.
|
// Fix in authorized_keys file.
|
||||||
sshPath := path.Join(models.SshPath, "authorized_keys")
|
sshPath := path.Join(models.SshPath, "authorized_keys")
|
||||||
fmt.Printf("Fixing pathes in file: %s\n", sshPath)
|
if com.IsFile(sshPath) {
|
||||||
if err := rewriteAuthorizedKeys(sshPath, oldPath, execPath); err != nil {
|
fmt.Printf("Fixing pathes in file: %s\n", sshPath)
|
||||||
fmt.Println(err)
|
if err := rewriteAuthorizedKeys(sshPath, oldPath, execPath); err != nil {
|
||||||
os.Exit(1)
|
fmt.Println(err)
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fix position in gogs-repositories.
|
// Fix position in gogs-repositories.
|
||||||
|
|
Loading…
Reference in a new issue