Skip to content

Commit

Permalink
Exit if it wasn't possible to zip undeclared outputs because zip fa…
Browse files Browse the repository at this point in the history
…iled.

Fixes bazelbuild#23479.

PiperOrigin-RevId: 670894294
Change-Id: I40319db72123358770a56d217dafb4fc7fd0d467
  • Loading branch information
tjgq authored and bazel-io committed Sep 4, 2024
1 parent 77ed5ee commit 92a9edc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/test/test-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,8 @@ if [[ -n "$TEST_UNDECLARED_OUTPUTS_ZIP" ]] && cd "$TEST_UNDECLARED_OUTPUTS_DIR";
UNDECLARED_OUTPUTS=(*)
if [[ "${#UNDECLARED_OUTPUTS[@]}" != 0 ]]; then
if ! zip_output="$(zip -qr "$TEST_UNDECLARED_OUTPUTS_ZIP" -- "${UNDECLARED_OUTPUTS[@]}")" ; then
echo >&2 "Could not create \"$TEST_UNDECLARED_OUTPUTS_ZIP\": $zip_output"
echo >&2 "Could not create \"$TEST_UNDECLARED_OUTPUTS_ZIP\": $zip_output"
exit 1
fi
# Use 'rm' instead of 'zip -m' so that we don't follow symlinks when deleting the
# contents.
Expand Down

0 comments on commit 92a9edc

Please sign in to comment.