From bf88ac9f33b078a592a6ce3bf5d9421a42ccc422 Mon Sep 17 00:00:00 2001 From: Roland Date: Sat, 27 Jun 2026 13:57:27 -0600 Subject: [PATCH] Disambiguate 'git checkout release' in install.sh The tracked release/ directory collides with the release branch name, so a bare `git checkout release` is ambiguous ("could be both a local file and a tracking branch") and aborts a fresh install. Use `checkout -B origin/`, which can never be parsed as a path. Co-Authored-By: Claude Opus 4.8 (1M context) --- install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index e40a6cc3..a12510a8 100755 --- a/install.sh +++ b/install.sh @@ -56,7 +56,9 @@ set -e apt install -y git git --version git clone https://github.com/lrnselfreliance/wrolpi.git /opt/wrolpi || : -(cd /opt/wrolpi && git fetch && git checkout "${BRANCH}" && git reset --hard origin/"${BRANCH}") || exit 4 +# Use `checkout -B origin/` so the ref can never be mistaken for a path. A tracked `release/` +# directory otherwise collides with the `release` branch name, making a bare `git checkout release` ambiguous. +(cd /opt/wrolpi && git fetch && git checkout -B "${BRANCH}" "origin/${BRANCH}" && git reset --hard origin/"${BRANCH}") || exit 4 if [ ${rpi} == true ]; then /opt/wrolpi/scripts/install_raspberrypios.sh 2>&1 | tee /opt/wrolpi/install.log