-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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 is incorrect when using macOS and zsh #133012
Comments
I'm also seeing this issue with different $PATHs in VS Code's Terminal and Terminal.app.
➜ ~ echo $PATH | sed 's/:/\n/g'
/Users/james/.rbenv/shims
/opt/homebrew/opt/openssl@1.1/bin
/Users/james/.rbenv/shims
/Users/james/.deno/bin
/Users/james/.composer/vendor/bin
/Users/james/.nvm/versions/node/v14.17.4/bin
/opt/homebrew/opt/openssl@1.1/bin
/opt/homebrew/bin
/opt/homebrew/sbin
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
/Library/Apple/usr/bin
➜ ~ echo $PATH | sed 's/:/\n/g'
/Users/james/.rbenv/shims
/Users/james/.deno/bin
/Users/james/.composer/vendor/bin
/Users/james/.nvm/versions/node/v14.17.4/bin
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
/Library/Apple/usr/bin
/Users/james/.rbenv/shims
/opt/homebrew/bin
/opt/homebrew/sbin
/Users/james/.deno/bin
/Users/james/.composer/vendor/bin
/Users/james/.nvm/versions/node/v14.17.4/bin My EnvironmentVS Code version:
MacOS
ZSH version (also using Oh-My-Zsh):
|
I believe this is already fixed, can you see if you can reproduce in the Insiders build? |
Thanks for looking at this, Megan! The issue still persists for me this Insider build:
|
You can read about why this happens and how to fix here at https://code.visualstudio.com/docs/editor/integrated-terminal#_why-are-there-duplicate-paths-in-the-terminals-path-environment-variable-andor-why-are-they-reversed |
In short, if you want your PATH in VSCode Terminal to be the same as in macOS Terminal, just add
to your settings. I tried it and it worked. I can use the correct version of |
Thanks! |
Hi! I found that if I open VSCode with the command |
I also found that the |
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
echo $PATH | sed 's/:/\n/g'
code --disable-extensions
, open Terminal and executeecho $PATH | sed 's/:/\n/g'
I found this issue because I couldn't use the correct version of vim. In the above screenshots, the path of vim is different.
Related issue: #107169
The text was updated successfully, but these errors were encountered: