zed
zed copied to clipboard
Incorrect $PATH environment variable on MacOS when launched from the command line
Check for existing issues
- [X] Completed
Describe the bug / provide steps to reproduce it
When I launch Zed through the App menu the $PATH variable in Zed Terminal is correct and works for me, but when launching Zed through the command line, it is incorrect and results in certain apps not being launched.
This is what $PATH looks like when launched from the menu:
/Users/supersu/Library/Android/sdk/platform-tools:/Users/supersu/Library/Android/sdk/emulator:/Users/supersu/Library/Android/sdk/cmdline-tools/latest/bin:/Users/supersu/Library/Application Support/pear/bin:/opt/local/bin:/opt/local/sbin:/Users/supersu/.nvm/versions/node/v20.14.0/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/usr/local/MacGPG2/bin:/Users/supersu/.spicetify
When launching Zed from the terminal the $PATH looks like this:
/Users/supersu/Library/Android/sdk/platform-tools:/Users/supersu/Library/Android/sdk/emulator:/Users/supersu/Library/Android/sdk/cmdline-tools/latest/bin:/Users/supersu/.nvm/versions/node/v20.14.0/bin:/Users/supersu/Library/Application Support/pear/bin:/opt/local/bin:/opt/local/sbin:/Users/supersu/.nvm/versions/node/v20.14.0/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/usr/local/MacGPG2/bin:/Users/supersu/Library/Android/sdk/platform-tools:/Users/supersu/Library/Android/sdk/emulator:/Users/supersu/Library/Android/sdk/cmdline-tools/latest/bin:/Users/supersu/Library/Application Support/pear/bin:/opt/local/bin:/opt/local/sbin:/Users/supersu/.nvm/versions/node/v20.14.0/bin:/Applications/iTerm 2.app/Contents/Resources/utilities:/Users/supersu/.spicetify:/Users/supersu/.spicetify
Notice that /Users/supersu/.nvm/versions/node/v20.14.0/bin comes before /Users/supersu/Library/Application Support/pear/bin, that is the problem.
This launches the incorrect version of certain apps for me and they do not run at all/
Zed Version and System Specs
Zed: v0.167.1 (Zed) OS: macOS 15.2.0 Memory: 16 GiB Architecture: aarch64
If applicable, add screenshots or screencasts of the incorrect state / behavior
No response
If applicable, attach your Zed.log file to this issue.
No response