From 83838af7cd99ffe1c40749590e997ac23434bf4f Mon Sep 17 00:00:00 2001 From: Florian Leeber Date: Thu, 2 Jun 2022 09:01:27 +0200 Subject: [PATCH] Evaluate repo sync return code and stop in case of error (cherry picked from commit 0a0e6d8cec5c63d797d7bf50f3e02a0942fe3b29) --- setup | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setup b/setup index f5591abe..fa9211d5 100755 --- a/setup +++ b/setup @@ -58,6 +58,13 @@ else # Synchronize new new sources repo sync -c -j$JOBS -q $REPO_ARGS + # Bail out here if repo sync has an error. Else this can lead to corrupted builds + # It is not enough to rely on previous repo sync by the user + if [ $? -ne 0 ]; then + echo "repo sync failed, check your device manifest. Stopping..." + exit 1 + fi + # Refresh the device & common repositories so apks and jars are not copied # For this to work, all apks and jars need to be removed from # device/$VENDOR/$DEVICE/*proprietary-files*.txt and