From 4acee9be8b192920267d54bce76bd5010e4f6716 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Sun, 10 May 2026 03:33:48 -0400 Subject: [PATCH] fix nvchad pull using wrong remote name Co-Authored-By: Claude Sonnet 4.6 --- install_nvchad.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/install_nvchad.sh b/install_nvchad.sh index d19e8de..7c80d5d 100755 --- a/install_nvchad.sh +++ b/install_nvchad.sh @@ -50,10 +50,16 @@ echo "" # If already installed and pointing at the right remote, just pull if [ -d "$NVIM_CONFIG/.git" ]; then - EXISTING_REMOTE=$(git -C "$NVIM_CONFIG" remote get-url hptrow 2>/dev/null || git -C "$NVIM_CONFIG" remote get-url origin 2>/dev/null || echo "") + REMOTE_NAME="" + if git -C "$NVIM_CONFIG" remote get-url hptrow &>/dev/null; then + REMOTE_NAME="hptrow" + elif git -C "$NVIM_CONFIG" remote get-url origin &>/dev/null; then + REMOTE_NAME="origin" + fi + EXISTING_REMOTE=$(git -C "$NVIM_CONFIG" remote get-url "$REMOTE_NAME" 2>/dev/null || echo "") if [ "$EXISTING_REMOTE" = "$REPO" ]; then echo "NvChad config already installed — pulling latest..." - git -C "$NVIM_CONFIG" pull hptrow "$BRANCH" + git -C "$NVIM_CONFIG" pull "$REMOTE_NAME" "$BRANCH" deploy_nvim_modules echo "Done." exit 0