Skip to content

Commit c126fcb

Browse files
committed
Ensure XCode build fails if cargo build fails.
1 parent 180aab3 commit c126fcb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test-runner/create-library.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,14 @@ fi
7171
if [[ "$CONFIGURATION" == "Release" ]]; then
7272
target_config="release"
7373
env PATH="${build_path}" cargo build --release "${build_args[@]}"
74+
if [[ "$?" != "0" ]]; then exit 1; fi
7475
elif [[ "$CONFIGURATION" == "Debug" ]]; then
7576
target_config="debug"
7677
env PATH="${build_path}" cargo build "${build_args[@]}"
78+
if [[ "$?" != "0" ]]; then exit 1; fi
7779
else
7880
echo "error: Unexpected build configuration: $CONFIGURATION"
81+
exit 1
7982
fi
8083
#
8184
# Copy the built library to the derived files directory

0 commit comments

Comments
 (0)