We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5428bfd commit 4574340Copy full SHA for 4574340
src/os/executable_darwin.go
@@ -6,5 +6,14 @@ package os
6
func runtime_executable_path() string
7
8
func Executable() (string, error) {
9
- return runtime_executable_path(), nil
+ p := runtime_executable_path()
10
+ if p != "" && p[0] == '/' {
11
+ // absolute path
12
+ return p, nil
13
+ }
14
+ cwd, err := Getwd()
15
+ if err != nil {
16
+ return "", err
17
18
+ return joinPath(cwd, p), nil
19
}
0 commit comments