mirror of
https://github.com/cmderdev/cmder.git
synced 2024-11-10 09:49:12 +08:00
properly set CMDER_ROOT for windows terminal bash
This commit is contained in:
parent
2ab6bcd72c
commit
86091b74e9
6
vendor/cmder.sh
vendored
6
vendor/cmder.sh
vendored
@ -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
4
vendor/cmder_exinit
vendored
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user