mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-13 05:43:53 -05:00
Use mktemp -d for RBENV_TEST_DIR
This prevents the tests from removing an existing directory. Fixes #561 (https://github.com/sstephenson/rbenv/issues/561)
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
unset RBENV_VERSION
|
unset RBENV_VERSION
|
||||||
unset RBENV_DIR
|
unset RBENV_DIR
|
||||||
|
|
||||||
RBENV_TEST_DIR="${BATS_TMPDIR}/rbenv"
|
RBENV_TEST_DIR="$(mktemp -d --tmpdir=$BATS_TMPDIR rbenv.bats.XXX)"
|
||||||
|
|
||||||
# guard against executing this block twice due to bats internals
|
# guard against executing this block twice due to bats internals
|
||||||
if [ "$RBENV_ROOT" != "${RBENV_TEST_DIR}/root" ]; then
|
if [ "$RBENV_ROOT" != "${RBENV_TEST_DIR}/root" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user