Change comment and always unset CD_HOME

This commit is contained in:
Niklas Holm
2018-02-14 09:58:32 +01:00
parent fb4ed54980
commit 000e81ffcb

View File

@@ -249,13 +249,11 @@ maybe_create_home ()
# c:\msys\usr\bin\bash -c "cd '%curdir'; export
# CHERE_INVOKING=1; exec /usr/bin/bash --login -i"
#
# Make sure we start in home unless invoked by CHERE
if [ ! -z "${CHERE_INVOKING}" ]; then
unset CHERE_INVOKING
elif [ "${CD_HOME}" = "yes" ]; then
unset CD_HOME
# Make sure we start in home if invoked through msys2_shell.cmd without -here option
if [ -z "${CHERE_INVOKING}" -a "${CD_HOME}" = "yes" ]; then
cd "${HOME}" || echo "WARNING: Failed attempt to cd into ${HOME}!"
fi
unset CHERE_INVOKING CD_HOME
}
maybe_create_home