Properly expand RBENV_DIR and ensure it exists
This commit is contained in:
parent
b670849ebd
commit
7fbcde8af0
@ -30,7 +30,12 @@ export RBENV_ROOT
|
|||||||
if [ -z "${RBENV_DIR}" ]; then
|
if [ -z "${RBENV_DIR}" ]; then
|
||||||
RBENV_DIR="$(pwd)"
|
RBENV_DIR="$(pwd)"
|
||||||
else
|
else
|
||||||
RBENV_DIR="$(abs_dirname "$RBENV_DIR")"
|
cd "$RBENV_DIR" 2>/dev/null || {
|
||||||
|
echo "rbenv: cannot change working directory to \`$RBENV_DIR'"
|
||||||
|
exit 1
|
||||||
|
} >&2
|
||||||
|
RBENV_DIR="$(pwd)"
|
||||||
|
cd "$OLDPWD"
|
||||||
fi
|
fi
|
||||||
export RBENV_DIR
|
export RBENV_DIR
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user