This is caused by snapcraft and the fact that this snap is using classic confinement.
The generated wrapper script has this content:
zyga@fyke:~/snapd$ cat /snap/gox/current/command-gox.wrapper #!/bin/sh exec "gox" "$@"
Since classic confinement does not reset PATH (because it cannot) gox is being resolved to /snap/bin/gox again, which causes exec/fork loop.
My suggestion would be to generate no wrappers for classic confinement or to warn people about this at build time.
This is caused by snapcraft and the fact that this snap is using classic confinement.
The generated wrapper script has this content:
zyga@fyke:~/snapd$ cat /snap/gox/ current/ command- gox.wrapper
#!/bin/sh
exec "gox" "$@"
Since classic confinement does not reset PATH (because it cannot) gox is being resolved to /snap/bin/gox again, which causes exec/fork loop.
My suggestion would be to generate no wrappers for classic confinement or to warn people about this at build time.