reject running the command on non-linux system

This commit is contained in:
Romwierz 2026-09-09 10:53:02 +02:00
parent b64372d939
commit d7ec016b32

View file

@ -68,7 +68,12 @@ if [ "${PYENV_BIN_PATH#${PYENV_ROOT}}" != "${PYENV_BIN_PATH}" ]; then
# Only add to $PATH for non-system version.
export PATH="${PYENV_BIN_PATH}:${PATH}"
fi
if [ -n "$MODIFY_ENV" ] && [ "$(uname -s)" = Linux ]; then
if [ -n "$MODIFY_ENV" ]; then
if [ "$(uname -s)" != Linux ]; then
echo 'Error: the -N option is supported only on Linux' >&2
exit 1
fi
# Check if multiple Python versions are selected
VERSIONS=$(pyenv-prefix)
if [[ "$VERSIONS" == *:* ]]; then