mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-24 10:28:10 +08:00
Add check for python path
This commit is contained in:
@@ -8,11 +8,17 @@
|
||||
export PATH="$PATH:/opt/pipx_bin"
|
||||
|
||||
toolset="$INSTALLER_SCRIPT_FOLDER/toolset.json"
|
||||
pipx_packages=$(jq -r ".pipx[]" $toolset)
|
||||
pipx_packages=$(jq ".pipx[] .package" $toolset)
|
||||
|
||||
for package in $pipx_packages; do
|
||||
echo "Install $package"
|
||||
pipx install $package
|
||||
python_path=$(jq ".pipx[] | select(.package == $package) .python" $toolset)
|
||||
if [ "$python_path" = "default" ]; then
|
||||
echo "Install $package into default python"
|
||||
pipx install $package
|
||||
else
|
||||
echo "Install $package into python $python_path"
|
||||
pipx install $package --python $python_path
|
||||
fi
|
||||
done
|
||||
|
||||
# Run tests to determine that the software installed as expected
|
||||
|
||||
Reference in New Issue
Block a user