Skip to content

Commit 0957c8c

Browse files
committed
fix: add stash before updating
Signed-off-by: Josef Andersson <josef.andersson@digg.se>
1 parent 65d7978 commit 0957c8c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

scripts/setup.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ get_latest_version() {
2828
update_to_version() {
2929
local version="$1"
3030
git -C "$DIR" fetch --all --quiet
31+
# Stash any local changes to avoid checkout conflicts
32+
git -C "$DIR" stash --quiet 2>/dev/null || true
3133
git -C "$DIR" checkout "$version" --quiet
3234
print_success "Updated to $version"
3335
}

0 commit comments

Comments
 (0)