Execute Script Golang Needs Full Path


I need to run a script in Golang, which I will pass a variable from keyboardmaestro. I already have this set up in python and it works fine, however in Golang I can't get it to work.

The script to test is simply to write something in a terminal, in this case in a window.

And I run it as I would do it from the terminal:

go run /Users/feliperodriguezfonte/Documents/keyboardMaestro/kdf.go


Any idea why it doesn't launch?

You haven't given the full path to the go compiler.

(In Terminal.app you don't have to do that because a $PATH variable is declared in the the Terminal.app shell environment)

This may be the question most frequently asked in this forum.

See, for example: