-
Notifications
You must be signed in to change notification settings - Fork 645
[mac os x] GOPATH isn't taken from current terminal session #141
Comments
It sounds like you might be hitting microsoft/vscode#560. Could you try quitting out of VS Code completely, then opening with Edit: Note that microsoft/vscode#560 is fixed, but has not yet been deployed in a VS Code update. |
Thanks @lukehoban for the quick reply!
That's exactly what I'm doing. Atom has the same problems, so I'm already battle-proven concerning that :)
It's still my |
Okay - I can reproduce this now. It seems that somehow the environment settings in ~/.bash_profile are being allowed to override those exported in the local terminal session. If there is nothing set in ~/.bash_profile the local settings work fine, but if there is something in ~/.bash_profile, it wins out over anything defined locally. Unfortunately though, I have no idea how to fix it :-). I have to assume this is a bug with either vscode or the way that |
I've opened microsoft/vscode#1033 to understand the root cause here. You can probably work around this by setting |
Thanks for submitting the vscode bug, @lukehoban! |
Closing this one out for now - since I don't think there's anything we can/should do in the Go extension beyond what we currently do with |
I have a global GOPATH (i.e. ~/go) but for many of my projects I have an .envrc setting the GOPATH to the project's directory so they install their dependencies in their own context. When I start
code .
from such a directory, it doesn't seem to respect the local GOPATH setting.Steps to reproduce:
.bash_profile
code () { VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $* ;}
code .
Expected:
PWD/src/...
are foundActual:
The text was updated successfully, but these errors were encountered: