mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-05 14:37:41 +02:00
fix 1540 and experimental SSH server support
This commit is contained in:
1 parent
b55499d039
commit
18c841050b
69 files changed
+171
-15479
No files matched your search
@@ -4,6 +4,12 @@
|
||||
|
||||
package base
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
const DOC_URL = "https://github.com/gogits/go-gogs-client/wiki"
|
||||
|
||||
type (
|
||||
@@ -11,3 +17,16 @@ type (
|
||||
)
|
||||
|
||||
var GoGetMetas = make(map[string]bool)
|
||||
|
||||
// ExecPath returns the executable path.
|
||||
func ExecPath() (string, error) {
|
||||
file, err := exec.LookPath(os.Args[0])
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
p, err := filepath.Abs(file)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return p, nil
|
||||
}
|
||||
Reference in new issue
Block a user