From df91ba6c4cb808eec4e222764691696491bb0c29 Mon Sep 17 00:00:00 2001 From: Raphael Westphal Date: Tue, 18 Aug 2026 17:02:20 +0200 Subject: [PATCH] deploy: filter git: packages (husky postinstall crashes container sessions) --- deploy/rsync-pi-agent.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/deploy/rsync-pi-agent.sh b/deploy/rsync-pi-agent.sh index ba248d9..45411dd 100755 --- a/deploy/rsync-pi-agent.sh +++ b/deploy/rsync-pi-agent.sh @@ -23,9 +23,26 @@ rsync -a --delete \ --exclude 'trust.json' \ --exclude 'mcp-*' \ --exclude 'run-history*' \ - --exclude 'vibes/' \ + --exclude 'vibes' \ --exclude '*.log' \ --exclude 'scratch/' \ --exclude '.pi/' \ "$SRC/" "$DEST/" + +# Container sessions cannot run git: package postinstalls (e.g. husky) — keep +# registry (npm:) packages only in the baked settings.json. +python3 - "$DEST/settings.json" <<'PY' +import json, sys +p = sys.argv[1] +with open(p) as f: + s = json.load(f) +pkgs = s.get("packages") or [] +kept = [x for x in pkgs if x.startswith("npm:")] +if pkgs != kept: + s["packages"] = kept + with open(p, "w") as f: + json.dump(s, f, indent=2) + f.write("\n") + print(f"rsync-pi-agent: dropped {len(pkgs) - len(kept)} git: packages from baked settings") +PY echo "rsync-pi-agent: synced $(find "$DEST" -type f | wc -l) files from $SRC"