-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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 issues with -i #30847
Comments
@idan I've removed your original post from #21655. Let's look at your issue independently. You can find out how to compile VS Code over here. It would be awesome if you went through it and try to figure out what is going on, as I fail to reproduce these issues in Fish. Another idea involves you sending me your full Fish configuration, so I could try to repro this. |
@joaomoreno beh, apologies, I got mixed up with the different issues and wrote an update on #29864. tl;dr I've managed to cobble together a working build, but haven't been able to figure out how to make a double-clickable thing that I don't run from a terminal. As for my fish config, here's the relevant files from my config.fish# Disable the greeting
set fish_greeting
set -x EDITOR "/usr/local/bin/code --wait"
alias ls "ls -FG"
alias git "hub"
alias h 'heroku'
alias hp 'heroku pg:psql'
alias d. 'desk .'
# chruby
. /usr/local/share/chruby/chruby.fish
. /usr/local/share/chruby/auto.fish
chruby 2.3.1
# Add node binpath by default
. ~/.config/fish/node_bin_path.fish
# Hook for desk activation
test -n "$DESK_ENV"; and . "$DESK_ENV"
# n-install
set -gx N_PREFIX $HOME/n
set -gx PATH $N_PREFIX/bin $PATH
eval (direnv hook fish) node_bin_path.fishfunction __node_binpath_cwd -v PWD
set -l node_modules_path "$PWD/node_modules/.bin"
if test -e "$node_modules_path"
set -g __node_binpath "$node_modules_path"
set -x PATH $PATH $__node_binpath
else
set -q __node_binpath
and set -l index (contains -i -- $__node_binpath $PATH)
and set -e PATH[$index]
and set -e __node_binpath
end
end
__node_binpath_cwd $PWD There's also a Thank you so much for helping me track this down! |
@idan And what are the exact variables that Code fails to pick up? Just one is sufficient. |
@joaomoreno Ok, tried with the insiders build you linked in 29864, and unfortunately still getting the bad path behavior, where
|
Just a note that, afaik, mac apps launched by usual means (finder, etc) don't have access to the user's PATH. It's controlled by launchd and LSEnvironment in the app .plist. The default PATH can be altered via /etc/paths or /etc/paths.d, but this is global. If you google for setting PATH in gui mac apps you'll see numerous threads of people complaining about .MacOSX/environment.plist no longer working. If it's launched via code at a command-line, LSEnvironment is no longer applied, and the PATH in the app will reflect the user's PATH. The same behavior occurs in sublime text and other gui mac apps which launch processes via the PATH. Extensions can of course alter their own search paths, the python one locates python in virtual environments, etc. It'd be nice if there was a global setting to alter PATH for the entire code process and extensions rather than having to adjust a ton of .path settings in settings.json. |
Changing shells via Is there any way I can help you track this down? |
@idan Are you using direnv to modify PATH in this case? |
@idan says
The text was updated successfully, but these errors were encountered: