From 6a0344fb0bc64f8c3a13d1318826305b367c61c2 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Mon, 4 Nov 2024 14:33:51 -0500 Subject: [PATCH] only attempt poetry install when not present (#18811) --- Install.ps1 | 6 +++++- install.sh | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Install.ps1 b/Install.ps1 index 051f48cd3198..0d2e40c5653f 100644 --- a/Install.ps1 +++ b/Install.ps1 @@ -102,7 +102,11 @@ foreach ($extra in $extras) $extras_cli += $extra } -./Setup-poetry.ps1 -pythonVersion "$pythonVersion" +if (-not (Get-Item -ErrorAction SilentlyContinue ".penv/Scripts/poetry.exe").Exists) +{ + ./Setup-poetry.ps1 -pythonVersion "$pythonVersion" +} + .penv/Scripts/poetry env use $(py -"$pythonVersion" -c 'import sys; print(sys.executable)') .penv/Scripts/poetry install @extras_cli diff --git a/install.sh b/install.sh index 0db2b258577c..6bd2e52218bc 100755 --- a/install.sh +++ b/install.sh @@ -168,7 +168,10 @@ if [ "$OPENSSL_VERSION_INT" -lt "269488367" ]; then echo "Your OS may have patched OpenSSL and not updated the version to 1.1.1n" fi -./setup-poetry.sh -c "${INSTALL_PYTHON_PATH}" +if [ ! -f .penv/bin/poetry ]; then + ./setup-poetry.sh -c "${INSTALL_PYTHON_PATH}" +fi + .penv/bin/poetry env use "${INSTALL_PYTHON_PATH}" # shellcheck disable=SC2086 .penv/bin/poetry install ${EXTRAS}