Open hyangah opened 1 year ago
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 https://github.com/microsoft/vscode/issues/179476
removing "-l" arg from the default "terminal.integrated.profiles.osx.zsh" setting does not work for me.
Actually this was meant to be fixed by https://github.com/microsoft/vscode/issues/99878. The fix will oly work if you have shell integration enabled. Do you see these dots to the left of the terminal?
@Tyriar I see those dots and seem to have shell integration enabled but still have the same issue. I am also using go version manager gvm
hi @Tyriar any update? I also encountered the same problem. Go env cannot be activated when using zsh. cc: @hyangah
vscode version: Version: 1.83.1 Commit: f1b07bd25dfad64b0167beb15359ae573aecd2cc Date: 2023-10-10T23:46:55.789Z Electron: 25.8.4 ElectronBuildId: 24154031 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Darwin x64 22.6.0
terminal configuration:
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. the suggested "remove -l for zsh" doesn't work this time. What helped:
WARNING: this is VSCode factory reset https://stackoverflow.com/a/64518036/11362891
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?