mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-14 06:23:52 -05:00
init: fix shell detection when invoked from a script
- fixes `ps` command to lookup parent process - adds `assert_output_contains_not` test helper Ref: https://github.com/yyuu/pyenv/issues/373
This commit is contained in:
@@ -97,6 +97,16 @@ assert_output_contains() {
|
||||
}
|
||||
}
|
||||
|
||||
assert_output_contains_not() {
|
||||
local expected="$1"
|
||||
echo "$output" | grep -F "$expected" >/dev/null && {
|
||||
{ echo "expected output to not contain $expected"
|
||||
echo "actual: $output"
|
||||
} | flunk; return
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
create_executable() {
|
||||
mkdir -p "${PYENV_ROOT}/versions/$1/bin"
|
||||
touch "${PYENV_ROOT}/versions/$1/bin/$2"
|
||||
|
||||
Reference in New Issue
Block a user