diff --git a/.claude/scripts/sync.sh b/.claude/scripts/sync.sh index a5d8919..d3d386a 100755 --- a/.claude/scripts/sync.sh +++ b/.claude/scripts/sync.sh @@ -66,9 +66,17 @@ echo "" echo "=== Phase 1a: Submodule update ===" if [ -f ".gitmodules" ]; then - git submodule update --remote --quiet 2>/dev/null && \ - echo -e "${GREEN}[OK]${NC} Submodules updated to latest remote." || \ - echo -e "${YELLOW}[WARNING]${NC} Submodule update failed (network or remote issue — continuing)." + # Temporarily disable errexit — submodule ops emit non-fatal warnings that + # would otherwise kill the script under set -e. + set +e + git submodule foreach --quiet ' + git fetch origin --quiet 2>/dev/null + git checkout main --quiet 2>/dev/null || git checkout master --quiet 2>/dev/null + git merge --ff-only origin/main --quiet 2>/dev/null || \ + git merge --ff-only origin/master --quiet 2>/dev/null + ' 2>/dev/null + set -e + echo -e "${GREEN}[OK]${NC} Submodules updated to latest remote (on branch)." else echo -e "${GREEN}[OK]${NC} No submodules." fi diff --git a/.gitmodules b/.gitmodules index c82a9df..ee40c38 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,4 @@ [submodule "projects/msp-tools/guru-rmm"] path = projects/msp-tools/guru-rmm url = https://git.azcomputerguru.com/azcomputerguru/gururmm.git + branch = main