mirror of
https://github.com/pyenv/pyenv.git
synced 2024-12-22 23:10:47 +00:00
Properly expand RBENV_DIR and ensure it exists
This commit is contained in:
parent
b670849ebd
commit
7fbcde8af0
1 changed files with 6 additions and 1 deletions
|
@ -30,7 +30,12 @@ export RBENV_ROOT
|
|||
if [ -z "${RBENV_DIR}" ]; then
|
||||
RBENV_DIR="$(pwd)"
|
||||
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
|
||||
export RBENV_DIR
|
||||
|
||||
|
|
Loading…
Reference in a new issue