properly set CMDER_ROOT for windows terminal bash

This commit is contained in:
Dax T. Games 2023-11-11 17:29:28 -08:00
parent 2ab6bcd72c
commit 86091b74e9
2 changed files with 9 additions and 1 deletions

6
vendor/cmder.sh vendored
View File

@ -22,7 +22,11 @@ function runProfiled {
} }
# We do this for bash as admin sessions since $CMDER_ROOT is not being set # We do this for bash as admin sessions since $CMDER_ROOT is not being set
if [ "$CMDER_ROOT" == "" ] ; then if [ -z "$CMDER_ROOT" ] && [ -n "$cmder_root" ] ; then
export CMDER_ROOT=$(cygpath -u $cmder_root)
fi
if [ -z "$CMDER_ROOT" ] ; then
case "$ConEmuDir" in *\\*) CMDER_ROOT=$( cd "$(cygpath -u "$ConEmuDir")/../.." ; pwd );; esac case "$ConEmuDir" in *\\*) CMDER_ROOT=$( cd "$(cygpath -u "$ConEmuDir")/../.." ; pwd );; esac
else else
case "$CMDER_ROOT" in *\\*) CMDER_ROOT="$(cygpath -u "$CMDER_ROOT")";; esac case "$CMDER_ROOT" in *\\*) CMDER_ROOT="$(cygpath -u "$CMDER_ROOT")";; esac

4
vendor/cmder_exinit vendored
View File

@ -44,6 +44,10 @@ function runProfiled {
# Check that we haven't already been sourced. # Check that we haven't already been sourced.
[[ -z ${CMDER_EXINIT} ]] && CMDER_EXINIT="1" || return [[ -z ${CMDER_EXINIT} ]] && CMDER_EXINIT="1" || return
if [ -z "$CMDER_ROOT" ] && [ -n "$cmder_root" ] ; then
export CMDER_ROOT=$(cygpath -u $cmder_root)
fi
# We do this for bash as admin sessions since $CMDER_ROOT is not being set # We do this for bash as admin sessions since $CMDER_ROOT is not being set
if [ "$CMDER_ROOT" = "" -a "$ConEmuDir" != "" ] ; then if [ "$CMDER_ROOT" = "" -a "$ConEmuDir" != "" ] ; then
if [ -d "${ConEmuDir}../../vendor" ] ; then if [ -d "${ConEmuDir}../../vendor" ] ; then