From 859b260764415fffe338444208b1b8dfe0233327 Mon Sep 17 00:00:00 2001 From: native-api Date: Thu, 10 Jun 2021 03:51:59 +0300 Subject: [PATCH] Check for shims in path with pure Bash (#1978) Closes https://github.com/pyenv/pyenv/issues/1921 --- libexec/pyenv-init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/pyenv-init b/libexec/pyenv-init index 544cd49a..0bb88fa7 100755 --- a/libexec/pyenv-init +++ b/libexec/pyenv-init @@ -176,7 +176,7 @@ function print_path() { } function warn_path() { - if ! perl -ls0x3A -e 'while (<>) { chomp; ($_ eq $d) && exit 0; } exit 1' -- -d="${PYENV_ROOT}/shims" <<<"$PATH" ; then + if ! [[ ":${PATH}:" == *":${PYENV_ROOT}/shims:"* ]] ; then echo 'echo '\''WARNING: `pyenv init -` no longer sets PATH.'\' echo 'echo '\''Run `pyenv init` to see the necessary changes to make to your configuration.'\' fi