Skip to content

Commit

Permalink
only attempt poetry install when not present (#18811)
Browse files Browse the repository at this point in the history
  • Loading branch information
altendky authored Nov 4, 2024
1 parent d95a5e7 commit 6a0344f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 4 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 6a0344f

Please sign in to comment.