From ab87960596a31237a8a6cbd688baac312b40302b Mon Sep 17 00:00:00 2001 From: Zachary <123345317+zachary-bailey@users.noreply.github.com> Date: Fri, 11 Oct 2024 13:34:55 -0400 Subject: [PATCH] fix: exit when bcc install fails (#5075) Co-authored-by: Zachary Bailey --- vhdbuilder/packer/install-dependencies.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vhdbuilder/packer/install-dependencies.sh b/vhdbuilder/packer/install-dependencies.sh index c77e8300555..d437bad2ee7 100644 --- a/vhdbuilder/packer/install-dependencies.sh +++ b/vhdbuilder/packer/install-dependencies.sh @@ -543,6 +543,7 @@ fi wait $BCC_PID BCC_EXIT_CODE=$? +chmod 755 /var/log/bcc_installation.log if [ $BCC_EXIT_CODE -eq 0 ]; then echo "Bcc tools successfully installed." @@ -552,8 +553,8 @@ if [ $BCC_EXIT_CODE -eq 0 ]; then EOF else echo "Error: installBcc subshell failed with exit code $BCC_EXIT_CODE" >&2 + exit $BCC_EXIT_CODE fi -chmod 755 /var/log/bcc_installation.log capture_benchmark "${SCRIPT_NAME}_finish_installing_bcc_tools" # use the private_packages_url to download and cache packages