Skip to content

Commit

Permalink
put head check back
Browse files Browse the repository at this point in the history
  • Loading branch information
ipitio committed Apr 16, 2024
1 parent 84d3dc3 commit e57f2f1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions advanced/Scripts/speedtestmod/mod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ..
}

Expand Down

0 comments on commit e57f2f1

Please sign in to comment.