You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of Go, VS Code & VS Code Go extension are you using?
Version Information
Run go version to get version of Go from the VS Code integrated terminal.
Run gopls -v version to get version of Gopls from the VS Code integrated terminal.
Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders.
Check your installed extensions to get the version of the VS Code Go extension
Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) > Go: Locate Configured Go Tools command.
Share the Go related settings you have added/edited
Run Preferences: Open Settings (JSON) command to open your settings.json file.
Share all the settings with the go. or ["go"] or gopls prefixes.
{"go.goroot": "~bbb/.goenv/versions/1.23.0"}
Describe the bug
When running VSCode as user aaa with the config listed above,
a notification says "cannot find go binary in /home/aaa/bbb/.goenv/versions/1.23.0".
Steps to reproduce the behavior:
set the config listed aboved
enter a golang project
Screenshots or recordings
If applicable, add screenshots or recordings to help explain your problem.
Diagnosis
In setGOROOTEnvVar > resolvePath > resolveHomeDir, the function resolveHomeDir merely replace the character ~ to $HOME without consulting the /etc/passwd to get the homedir of user:bbb (the directory ~bbb refers to).
The text was updated successfully, but these errors were encountered:
Thank you for diagnosis. It sounds like the handling for ~ is ad-hoc, and does not support the ~bbb syntax. This is very unlikely to get fixed any time soon. Sorry.
What version of Go, VS Code & VS Code Go extension are you using?
Version Information
go version
to get version of Go from the VS Code integrated terminal.gopls -v version
to get version of Gopls from the VS Code integrated terminal.code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders.Go: Locate Configured Go Tools
command.Share the Go related settings you have added/edited
Run
Preferences: Open Settings (JSON)
command to open your settings.json file.Share all the settings with the
go.
or["go"]
orgopls
prefixes.Describe the bug
When running VSCode as user
aaa
with the config listed above,a notification says "cannot find go binary in /home/aaa/bbb/.goenv/versions/1.23.0".
Steps to reproduce the behavior:
Screenshots or recordings
If applicable, add screenshots or recordings to help explain your problem.
Diagnosis
In
setGOROOTEnvVar > resolvePath > resolveHomeDir
, the functionresolveHomeDir
merely replace the character~
to$HOME
without consulting the/etc/passwd
to get the homedir of user:bbb (the directory~bbb
refers to).The text was updated successfully, but these errors were encountered: