mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Ensure RBENV_VERSION_ORIGIN is not inherited from environment
It's only supposed to be set from `version-origin` hooks, but not inherited from environment in case it was set.
This commit is contained in:
parent
40c1d27445
commit
4fde4ecbaf
2 changed files with 7 additions and 0 deletions
|
@ -3,6 +3,8 @@
|
|||
set -e
|
||||
[ -n "$RBENV_DEBUG" ] && set -x
|
||||
|
||||
unset RBENV_VERSION_ORIGIN
|
||||
|
||||
OLDIFS="$IFS"
|
||||
IFS=$'\n' scripts=(`rbenv-hooks version-origin`)
|
||||
IFS="$OLDIFS"
|
||||
|
|
|
@ -52,3 +52,8 @@ setup() {
|
|||
|
||||
assert_success "plugin"
|
||||
}
|
||||
|
||||
@test "doesn't inherit RBENV_VERSION_ORIGIN from environment" {
|
||||
RBENV_VERSION_ORIGIN=ignored run rbenv-version-origin
|
||||
assert_success "${RBENV_ROOT}/version"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue