The Go playground does not allow running arbitrary external commands. No
doubt primarily for security reasons. But also because the playground
environment is not a complete virtualized OS. For example, try to execute

exec.Command("/bin/ls", "-la")

You'll get a "not implemented on nacl" error. See
https://blog.golang.org/playground

On Fri, Oct 11, 2019 at 8:34 PM Xiangdong JI <xiangdong...@arm.com> wrote:

> Hi,
>
> Given a command execution like "cmd := exec.CommandContext(ctx, "go",
> "run", file)" playground reports the following error:
>
> child error: exec: "go": executable file not found in $PATH
>
>
> Could it be solved by specifying a full path for 'go', which path shall I
> use? Thanks a lot.
>
> https://play.golang.org/p/6b79TLLCzfP
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/30f33420-47d9-4fe7-8e39-980f8d5370db%40googlegroups.com
> <https://groups.google.com/d/msgid/golang-nuts/30f33420-47d9-4fe7-8e39-980f8d5370db%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CABx2%3DD8_uGWv2AORkg%2ByPxxr4o%2BhuSoqnP6CxwAhZcTdspB5kg%40mail.gmail.com.

Reply via email to