diff --git a/selfdrive/test/setup_device_ci.sh b/selfdrive/test/setup_device_ci.sh index 67671546a6..238af373f7 100755 --- a/selfdrive/test/setup_device_ci.sh +++ b/selfdrive/test/setup_device_ci.sh @@ -86,7 +86,7 @@ safe_checkout() { rsync -a --delete $SOURCE_DIR $TEST_DIR } -unsafe_checkout() { +unsafe_checkout() {( set -e # checkout directly in test dir, leave old build products cd $TEST_DIR @@ -105,7 +105,7 @@ unsafe_checkout() { git lfs pull (ulimit -n 65535 && git lfs prune) -} +)} export GIT_PACK_THREADS=8 @@ -116,7 +116,12 @@ fi if [ ! -z "$UNSAFE" ]; then echo "trying unsafe checkout" - unsafe_checkout || safe_checkout + set +e + unsafe_checkout + if [[ "$?" -ne 0 ]]; then + safe_checkout + fi + set -e else echo "doing safe checkout" safe_checkout