diff --git a/images/linux/scripts/installers/pipx-packages.sh b/images/linux/scripts/installers/pipx-packages.sh index 6a5fe4df7..5f908b9fb 100644 --- a/images/linux/scripts/installers/pipx-packages.sh +++ b/images/linux/scripts/installers/pipx-packages.sh @@ -19,13 +19,11 @@ for package in $pipx_packages; do 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 -echo "Testing to make sure that script performed as expected, and basic scenarios work" -for cmd in $pipx_packages; do + # Run tests to determine that the software installed as expected + cmd=$(jq ".pipx[] | select(.package == $package) .cmd" $toolset) if ! command -v $cmd; then - echo "$cmd was not installed" + echo "$package was not installed" exit 1 fi done diff --git a/images/linux/toolsets/toolset-1804.json b/images/linux/toolsets/toolset-1804.json index f466f9f0a..10b5fb75c 100644 --- a/images/linux/toolsets/toolset-1804.json +++ b/images/linux/toolsets/toolset-1804.json @@ -192,11 +192,13 @@ "pipx": [ { "package": "yamllint", - "python": "default" + "python": "default", + "cmd": "yamllint" }, { "package": "aws-sam-cli", - "python": "/opt/hostedtoolcache/Python/3.7*/x64/bin/python3.7" + "python": "/opt/hostedtoolcache/Python/3.7*/x64/bin/python3.7", + "cmd": "sam" } ] } diff --git a/images/linux/toolsets/toolset-2004.json b/images/linux/toolsets/toolset-2004.json index 6bf5ece74..00f888c67 100644 --- a/images/linux/toolsets/toolset-2004.json +++ b/images/linux/toolsets/toolset-2004.json @@ -155,11 +155,13 @@ "pipx": [ { "package": "yamllint", - "python": "default" + "python": "default", + "cmd": "yamllint" }, { "package": "aws-sam-cli", - "python": "/opt/hostedtoolcache/Python/3.7*/x64/bin/python3.7" + "python": "/opt/hostedtoolcache/Python/3.7*/x64/bin/python3.7", + "cmd": "sam" } ] }