mirror of
https://github.com/actions/runner-images.git
synced 2026-01-07 02:28:54 +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"
|
||||
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
|
||||
|
||||
@@ -190,7 +190,13 @@
|
||||
]
|
||||
},
|
||||
"pipx": [
|
||||
"yamllint",
|
||||
"aws-sam-cli"
|
||||
{
|
||||
"package": "yamllint",
|
||||
"python": "default"
|
||||
},
|
||||
{
|
||||
"package": "aws-sam-cli",
|
||||
"python": "/opt/hostedtoolcache/Python/3.7*/x64/bin/python3.7"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -153,7 +153,13 @@
|
||||
]
|
||||
},
|
||||
"pipx": [
|
||||
"yamllint",
|
||||
"aws-sam-cli"
|
||||
{
|
||||
"package": "yamllint",
|
||||
"python": "default"
|
||||
},
|
||||
{
|
||||
"package": "aws-sam-cli",
|
||||
"python": "/opt/hostedtoolcache/Python/3.7*/x64/bin/python3.7"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user