flathub / com.visualstudio.code.oss

https://flathub.org/apps/details/com.visualstudio.code.oss
GNU Affero General Public License v3.0
47 stars 12 forks source link

Access golang go binary #21

Closed WobblingAgility closed 6 years ago

WobblingAgility commented 6 years ago

When using Visual Studio for Go it would complain about the binary being missing. I found that the flatpak had access to the go binary at /run/host/usr/bin. Is it possible to update the flatpak PATH to include /run/host/usr/bin?

WobblingAgility commented 6 years ago

It seems that adding /run/host/usr/bin to the path did not work since on Fedora Silverblue is is linked to /etc/alternative, which the flatpak can not access. I found there was also a go binary in /run/host/usr/lib/golang/bin and I am using that with flatpak run --env=PATH=/app/bin:/usr/bin:/run/host/usr/lib/golang/bin:$GOBIN com.visualstudio.code.oss.

I was able to get VS working with Go this way but it doesn't seem practical. Would there be a better way to solve this issue?

amtlib-dot-dll commented 6 years ago

Install by flatpak install flathub org.freedesktop.Sdk.Extension.golang, and it will be under /usr/lib/sdk/golang/bin/go. . /usr/lib/sdk/golang/enable.sh is also useful

WobblingAgility commented 6 years ago

This works and prevents me from having to install go to the system (great for Fedora Silverblue). Launching with flatpak run --env=PATH=/app/bin:/usr/bin:/usr/lib/sdk/golang/bin:$GOBIN com.visualstudio.code.oss works with no issues noticed.

rodrigoaraujoti commented 5 years ago

WobblingAgility it works. But I need to open the vscode only with this script. How can I define these as defaut params?

amtlib-dot-dll commented 5 years ago

flatpak override is your friend