-
Notifications
You must be signed in to change notification settings - Fork 29.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PATH mutation using EnvironmentVariableCollection prepend is overwritten in zsh #188235
Comments
This is because login shells on macOS completely reset the environment. We have a proposal coming that will let you work around this by setting it via shell integration which runs after the login init scripts #179476 |
Actually this was meant to be fixed by #99878. The fix will oly work if you have shell integration enabled. Do you see these dots to the left of the terminal? |
hi @Tyriar any update? I also encountered the same problem. Go env cannot be activated when using zsh.
|
Cool. Time to downgrade VSCode again... |
Same issue here, shouldn't this be prioritized? This is heavily affecting the development process at my company and I'm sure a lot of other people |
this is the second time i come across this bug. WARNING: this is VSCode factory reset |
Hi team, facing the same issue. Any alternate solutions? |
same issue, changed to bash to avoid it |
VS Code Go extension tries to change the integrated terminals' PATH environment variable using
EnvironmentVariableCollection.prepend
api.I verified that the change contribution is known to vscode using "Terminal: Show Environment Contributions" command.
When I create a terminal tab with
bash
, I see the PATH change applied and go sdk path prepended as expected.But, when I create a terminal with
zsh
, it looks like zsh prepends the login shell PATH again after applying our extension's PATH change.Note all
"terminal.integrated.profiles.*"
settings were default.A workaround I found is to remove
"-l"
arg from the default"terminal.integrated.profiles.osx.zsh"
setting. But I don't know if it's ok to recommend this change to all zsh users. I see the default"terminal.integrated.profiles.osx.bash"
also has"-l"
but this bad interaction doesn't happen. Is it a known issue, or it is WAI?The text was updated successfully, but these errors were encountered: