1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-13 22:03:52 -05:00

Merge remote-tracking branch 'rbenv/master' into rbenv-1.0

This commit is contained in:
Yamashita, Yuu
2016-03-02 01:39:52 +00:00
26 changed files with 241 additions and 218 deletions

View File

@@ -17,6 +17,7 @@ if [ -z "$PYENV_TEST_DIR" ]; then
export PYENV_ROOT="${PYENV_TEST_DIR}/root"
export HOME="${PYENV_TEST_DIR}/home"
export PYENV_HOOK_PATH="${PYENV_ROOT}/pyenv.d"
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
PATH="${PYENV_TEST_DIR}/bin:$PATH"
@@ -129,3 +130,11 @@ path_without() {
path="${path#:}"
echo "${path%:}"
}
create_hook() {
mkdir -p "${PYENV_HOOK_PATH}/$1"
touch "${PYENV_HOOK_PATH}/$1/$2"
if [ ! -t 0 ]; then
cat > "${PYENV_HOOK_PATH}/$1/$2"
fi
}