-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The output pane always shows fork/exec : no such file or directory
#1
Comments
I suspect that the 'Golang binary' path does not work correctly on Mac OS, since it was empty as first. I'm using it on my workstation(linux) and the go path does get populated at startup.I will try to replicate the issue on my mac later in the day. |
This line shows that the switch os := runtime.GOOS; os {
case "darwin":
fallthrough
case "linux":
cmd := exec.Command("which", "go")
stdout, err := cmd.Output()
if err != nil {
}
goBinary = string(stdout)
} An alternative approach is shown here: switch os := runtime.GOOS; os {
case "darwin", "linux":
cmd := exec.Command("which", "go")
stdout, err := cmd.Output()
if err != nil {
}
goBinary = string(stdout)
} |
Yep you were right, the switch case was ignored. I published a new release where this is fixed + the gobinary path should also work now. Let me know, if it works. |
I removed my Ginker config ( Fun fact: Forking a child process from within macOS app bundle does not inherit the environment of the user that launched the app bundle 🤦 I got it working by appending switch runtime.GOOS {
case "darwin", "linux":
// Configure $PATH with a sensible default
defaultGoBin := filepath.Clean(path.Join(runtime.GOROOT(), "bin"))
os.Setenv("PATH", fmt.Sprintf("%s:%s", os.Getenv("PATH"), defaultGoBin))
cmd := exec.Command("which", "go")
stdout, err := cmd.Output()
if err != nil {
}
goBinary = string(stdout)
} A safer approach would be this: switch runtime.GOOS {
case "darwin", "linux":
cmd := exec.Command("which", "go")
stdout, err := cmd.Output()
if err != nil {
}
goBinary = string(stdout)
if goBinary == "" && runtime.GOROOT() != "" {
goBinary = filepath.Clean(path.Join(runtime.GOROOT(), "bin", "go"))
}
} |
Nice, did not think of running the app inside the app bundle. I committed your suggestions to the master branch 👍 |
Summary:
The output pane always shows
fork/exec : no such file or directory
.Steps to Reproduce:
/Applications
/usr/local/go/bin/go
in preferences (because it was empty)fmt.Println
.Environment:
Expected Outcome:
Actual Outcome:
fork/exec : no such file or directory
.The text was updated successfully, but these errors were encountered: