From 0760e6f8784f20497de2b1401a47f57ee155f123 Mon Sep 17 00:00:00 2001 From: Victor Payno Date: Tue, 16 Jan 2024 08:22:02 -0800 Subject: [PATCH] ci(docker-build): remove bashisms from /etc/profile.d/python.sh --- .github/citools/python/python-setup-install | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/citools/python/python-setup-install b/.github/citools/python/python-setup-install index 9a7c75ba..dbac1198 100755 --- a/.github/citools/python/python-setup-install +++ b/.github/citools/python/python-setup-install @@ -82,20 +82,20 @@ main() { export PYENV_ROOT="/usr/local/pyenv" - if [[ ! \${PATH} =~ \${PYENV_ROOT}/bin ]]; then + if echo \${PATH} | grep -q \${PYENV_ROOT}/bin; then export PATH="\${PYENV_ROOT}/bin:\${PATH}" fi if command -v pyenv 1>/dev/null 2>&1; then - if [[ ! \${PATH} =~ \${PYENV_ROOT}/shims ]]; then + if echo \${PATH} | grep -q \${PYENV_ROOT}/shims; then eval "\$(pyenv init --path)" fi - if [[ -z \${PYENV_SHELL} ]]; then + if [ -z \${PYENV_SHELL} ]; then eval "\$(pyenv init -)" fi - if [[ ! \${PATH} =~ \${PYENV_ROOT}/plugins/pyenv-virtualenv/shims ]]; then + if echo \${PATH} | grep -q \${PYENV_ROOT}/plugins/pyenv-virtualenv/shims; then eval "\$(pyenv virtualenv-init -)" fi fi