From e57f2f14cf4779de59dd69b583b6bbac4ee609f0 Mon Sep 17 00:00:00 2001 From: ipitio <21136719+ipitio@users.noreply.github.com> Date: Tue, 16 Apr 2024 07:50:46 -0400 Subject: [PATCH] put head check back --- advanced/Scripts/speedtestmod/mod.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/advanced/Scripts/speedtestmod/mod.sh b/advanced/Scripts/speedtestmod/mod.sh index d8e047e734..b2ff446893 100755 --- a/advanced/Scripts/speedtestmod/mod.sh +++ b/advanced/Scripts/speedtestmod/mod.sh @@ -82,8 +82,11 @@ download() { grep -q "$desiredVersion$" <<<"$tags" && desiredVersion=$(grep "$desiredVersion$" <<<"$tags" | awk '{print $1;}') || desiredVersion=$currentVersion fi - git fetch origin --depth=1 $desiredVersion -q - git -c advice.detachedHead=false checkout $desiredVersion -q + if [ "$(git rev-parse HEAD)" != "$desiredVersion" ]; then + git fetch origin --depth=1 $desiredVersion -q + git reset --hard $desiredVersion -q + fi + cd .. }