fix nvchad pull using wrong remote name

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Paul Trowbridge 2026-05-10 03:33:48 -04:00
parent 6b12390fc5
commit 4acee9be8b

View File

@ -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