From 24b84b895ce7d5cb31832325a689cd3024e57ab7 Mon Sep 17 00:00:00 2001 From: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Date: Tue, 27 Aug 2024 20:00:05 -0300 Subject: [PATCH] fix(install): Fetch before checkout to avoid errors --- tools/install-arduino.sh | 2 +- tools/install-esp-idf.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/install-arduino.sh b/tools/install-arduino.sh index abd1526fe..1a0ba4d39 100755 --- a/tools/install-arduino.sh +++ b/tools/install-arduino.sh @@ -41,8 +41,8 @@ fi if [ "$AR_BRANCH" ]; then echo "AR_BRANCH='$AR_BRANCH'" + git -C "$AR_COMPS/arduino" fetch --all && \ git -C "$AR_COMPS/arduino" checkout "$AR_BRANCH" && \ - git -C "$AR_COMPS/arduino" fetch && \ git -C "$AR_COMPS/arduino" pull --ff-only fi if [ $? -ne 0 ]; then exit 1; fi diff --git a/tools/install-esp-idf.sh b/tools/install-esp-idf.sh index c6f65dfbc..bd3d07985 100755 --- a/tools/install-esp-idf.sh +++ b/tools/install-esp-idf.sh @@ -17,6 +17,8 @@ if [ ! -d "$IDF_PATH" ]; then idf_was_installed="1" fi +git -C "$IDF_PATH" fetch --all --tags + if [ "$IDF_TAG" ]; then git -C "$IDF_PATH" checkout "tags/$IDF_TAG" idf_was_installed="1"