-
Notifications
You must be signed in to change notification settings - Fork 651
Remote-WSL does not find go even if it is on $PATH #2504
Comments
Apologies for the late reply @davidovich @sandy081 When looking at the PATH env variable to find a directory where the go executable can be found I am using the below const envPath = process.env['PATH'] || (process.platform === 'win32' ? process.env['Path'] : null); Is it possible that in case of Remote-WSL, this platform check results in me not getting the PATH value at all? |
@davidovich Does your fix in #2505 (comment) help with the issue here as well? |
I met the similar problem with Remote-SSH. VM restart can fix this. What I think is that when vscode-server starts up, go binary is not in the PATH. Even you add it to PATH later, vscode-server's process holds the original PATH, so the extension can't find the go binary. But this is only my speculation. |
Will try to reproduce, but my access to a Windows machine will only be next
Tuesday, as it is a holiday on Monday here in Canada.
Le sam. 29 juin 2019 à 09:08, Aaron Jheng <notifications@github.com> a
écrit :
… I met the similar problem with Remote-SSH. VM restart can fix this. What I
think is that when vscode-server starts up, go binary is not in the PATH.
Even you add it to PATH later, vscode-server's process holds the original
PATH, so the extension can't find the go binary. But this is only my
speculation.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2504?email_source=notifications&email_token=AAK7U4WEE5PS46RFVV33X43P45NGBA5CNFSM4HLUF2LKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY3YPUA#issuecomment-506955728>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAK7U4S7FEYW5YGRXUTNERLP45NGBANCNFSM4HLUF2LA>
.
|
@ramya-rao-a Depends on who is setting these variables. If these variables are set by the platform or node, then they should be available. |
@davidovich Please try the latest version of the Go extension (0.11.1) where the warning on not able to find the Go binary now includes the PATH that was searched. That should give some insights on what is happening |
I removed the
I think we can close as it seems fixed. |
Environment:
Version: 1.34.0-insider (user setup)
Commit: daf71423252a707b8e396e8afa8102b717f8213b
Date: 2019-05-06T22:08:08.969Z
Electron: 3.1.8
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.17763
Problem: go is not found even if it is on path, even though the extension tells me otherwise.
My go installation is managed by linuxbrew in WSL.
Note that without the
go.goroot
setting, nothing works (go
and tools are not found and I am prompted withCannot find "go" binary. Update PATH or GOROOT appropriately
). I would expect that the extension find go without setting the go.goroot.When I set go.goroot:
Things work a little better, but I have other issues with the debugger (#2505).
I have searched the code and found this hardcoded
/usr/local/go/bin/go
path. Would it be possible to have an exec.LookPath equivalent ?Note also that linuxbrew installs it's dependencies through symlinks, so that IMHO symlinks should be followed.
I am not sure what the $PATH is in the WSL based extension host, but my
.profile
does not seem to be parsed to allow modifying the PATH. Editing/etc/environment
does not fix the problem either.The text was updated successfully, but these errors were encountered: