Skip to content

Remove - SSH not using server-env-setup to set environment variables #2917

Description

  • VSCode Version: 1.44.2
  • Local OS Version: Windows 10
  • Remote OS Version: Ubuntu 14.04
  • Remote Extension/Connection Type: SSH

Description:
I have some custom settings such as GOPATH, GOROOT, $PATH additions, etc. that need to be done for the VSCode to pick them up. Based on instructions on instructions in "Advanced: Environment setup script" I added script text to "server-env-setup" to enumerate folders and add them to the relevant variables above. However even after killing and restarting remote vscode-server and reloading vscode IDE, the script doesn't seem to be taking any effect.

Steps to Reproduce:

  1. Write custom steps to "server-env-setup" to append to GOPATH, GOROOT, PATH, etc and export these env variables.
  2. Restart the vscode-remote server instance and reload the vscode IDE.
  3. On opening vs code Go extension shows following text in the error pop-up
    Failed to run "go env" to find GOPATH as the "go" binary cannot be found in either GOROOT(undefined) or PATH......

Workaround:
If I create a custom shell script and add the line "source ~/makeenv.sh" to my ~/.zshrc, then everything works fine.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugsshIssue in vscode-remote SSH

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions