Skip to content

Commit

Permalink
properly set CMDER_ROOT for windows terminal bash
Browse files Browse the repository at this point in the history
  • Loading branch information
daxgames committed Nov 12, 2023
1 parent 2ab6bcd commit 86091b7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vendor/cmder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ function runProfiled {
}

# 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
else
case "$CMDER_ROOT" in *\\*) CMDER_ROOT="$(cygpath -u "$CMDER_ROOT")";; esac
Expand Down
4 changes: 4 additions & 0 deletions vendor/cmder_exinit
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ function runProfiled {
# Check that we haven't already been sourced.
[[ -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
if [ "$CMDER_ROOT" = "" -a "$ConEmuDir" != "" ] ; then
if [ -d "${ConEmuDir}../../vendor" ] ; then
Expand Down

0 comments on commit 86091b7

Please sign in to comment.