From 1dab34ca783b4252cb85532637d74c3f495e7d68 Mon Sep 17 00:00:00 2001 From: Greg Dumas Date: Thu, 12 Dec 2024 16:52:04 -0500 Subject: [PATCH] Add error handling for pip3 install --- bin/install.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/install.sh b/bin/install.sh index a7b5912..a34f1fb 100755 --- a/bin/install.sh +++ b/bin/install.sh @@ -79,9 +79,14 @@ for package in "${packages[@]}"; do done + # pip install requirements -pip3 install boto boto3 --user -pip3 install 'yq==2.10.0' --user +python_packages=(boto boto3 'yq==2.10.0') +for package in "${python_packages[@]}"; do + pip3 install "$package" --user || { + exit 1 + } +done # install AWS collection for ansible