mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 12:26:39 +00:00
fix(vscode): avoid interactive shell setup during VSCode shell resolving
When VSCode is started from normal non-terminal/CLI methods, it will start a interactive shell session in the background to dump the the env and get PATH. Latest versions of VSCode do no play nice with Mise's dynamic PATH updating stuff, and understandably so. Hence we now check VSCODE_RESOLVING_ENVIRONMENT and avoid all interactive shell setup when it is set.
This commit is contained in:
9
zshrc
9
zshrc
@@ -1,7 +1,14 @@
|
||||
#
|
||||
# Z-Shell Init
|
||||
# ZSH Interactive Shell Setup
|
||||
#
|
||||
|
||||
# If we are in VSCode's environment resolution process, we should behave as if
|
||||
# this is a non-interactive shell by bailing before we load any of our
|
||||
# interactive shell setup.
|
||||
if [[ -n $VSCODE_RESOLVING_ENVIRONMENT ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
# In our zshenv file we have on macOS disabled loading ZSH startup files from
|
||||
# /etc to avoid /etc/zprofile messing up our carefully constructed PATH. So we
|
||||
# need to manually load the other files we care about.
|
||||
|
||||
Reference in New Issue
Block a user