I have quite a simple Go app called myApp
that is supposed to launch a new Terminal window on macOS:
package main
import (
"fmt"
"os/exec"
)
func main() {
err := exec.Command("open", "-a", "Terminal", "/Users/ns/go/").Run()
if err != nil {
fmt.Println(err)
}
}
However, when I run the app I get the following output:
ns:~/go/src/github.com/nevadascout/myApp $ go install && myApp
exit status 1
If I run the command (open -a Terminal /Users/ns/go/
) in the terminal manually, it works.
What am I missing?