fix nvchad pull using wrong remote name
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
6b12390fc5
commit
4acee9be8b
@ -50,10 +50,16 @@ echo ""
|
|||||||
|
|
||||||
# If already installed and pointing at the right remote, just pull
|
# If already installed and pointing at the right remote, just pull
|
||||||
if [ -d "$NVIM_CONFIG/.git" ]; then
|
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
|
if [ "$EXISTING_REMOTE" = "$REPO" ]; then
|
||||||
echo "NvChad config already installed — pulling latest..."
|
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
|
deploy_nvim_modules
|
||||||
echo "Done."
|
echo "Done."
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user