1
I am on MacOS Mojave and I can't figure out why visual studio code's integrated terminal has a different path variable than the normal terminal.
I have checked that VSCode opens /bin/bash
(echo $SHELL
yields /bin/bash
).
However when executing echo $PATH
in the integrated terminal it yields /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/anaconda3/bin:/anaconda3/condabin
while on the normal terminal it gives /anaconda3/bin:/anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
They both source ~/.bash_profile
which contains the following :
# added by Anaconda3 2018.12 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
\eval "$__conda_setup"
else
if [ -f "/anaconda3/etc/profile.d/conda.sh" ]; then
. "/anaconda3/etc/profile.d/conda.sh"
CONDA_CHANGEPS1=false conda activate base
else
\export PATH="/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
Even after sourcing ~/.bash_profile
in the integrated terminal, /anaconda3/bin is at the end while ~/.bash_profile
prepends it which is confusing.
I think the default path must be added after bash_profile is sourced in the integrated terminal? Not sure how it works
I am hesitating to post this as an issue in the vscode repo but I just wanted to make sure it isn't my understanding that is off.