Skip to content

Commit ae5c082

Browse files
committed
catch error code
1 parent 3c64f8b commit ae5c082

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

scripts/build_layers.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ function find_and_spec_wheel {
146146
return 1
147147
fi
148148
fi
149-
150149
}
151150

152151
function docker_build_zip {
@@ -179,8 +178,8 @@ do
179178
for architecture in "${ARCHS[@]}"
180179
do
181180
echo "Building layer for Python ${python_version} arch=${architecture}"
182-
find_and_spec_wheel ${python_version} ${architecture} "ddtrace_serverless" "serverless"
183-
if [ $? != 0 ]; then
181+
find_and_spec_wheel ${python_version} ${architecture} "ddtrace_serverless" "serverless"; FAILURE=$?
182+
if [ $FAILURE != 0 ]; then
184183
echo "Attempting layer build again with package ddtrace"
185184
find_and_spec_wheel ${python_version} ${architecture} "ddtrace" "manylinux2014"
186185
fi

0 commit comments

Comments
 (0)