From 809bf6a61456555a1d144261c464c8640cf644ff Mon Sep 17 00:00:00 2001 From: jaypark Date: Sat, 14 Mar 2026 16:51:20 +0900 Subject: [PATCH] fix: use BRANCH variable in install.sh update path The update path was hardcoded to origin/master. Now uses the CODEMAN_BRANCH variable and updates the remote URL on upgrade. Co-Authored-By: Claude Opus 4.6 (1M context) --- install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index c5cf2433..b4e8112c 100755 --- a/install.sh +++ b/install.sh @@ -1065,13 +1065,14 @@ main() { if [[ -d "$INSTALL_DIR/.git" ]]; then info "Existing installation found, updating..." cd "$INSTALL_DIR" + git remote set-url origin "$REPO_URL" 2>/dev/null || true # Check for local changes if ! git diff --quiet 2>/dev/null || ! git diff --staged --quiet 2>/dev/null; then warn "Local changes detected in $INSTALL_DIR" if prompt_yes_no "Discard local changes and update?" "n"; then git fetch --quiet origin - git reset --hard origin/master --quiet + git reset --hard "origin/$BRANCH" --quiet else info "Keeping existing installation, skipping update" fi