mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix(skills): touchdesigner-mcp setup.sh — correct pgrep match + suppress stray yaml output
Discovered while dogfooding the skill end-to-end: - pgrep -if "TouchDesigner" matched any shell whose command line contained the substring (including the setup script's own invocation under certain wrappers), falsely reporting TD running on machines where it isn't. Switch to pgrep -x (exact process name match, supported on both macOS and Linux) and also check TouchDesignerFTE (the non-commercial variant). - The embedded python3 yaml-writer printed 'added' / 'exists' to stdout as status, which leaked a stray word into the setup output right before the ✔ line. Drop the print()s — the bash-level ✔/✘ is the status indicator.
This commit is contained in:
parent
6b31e20894
commit
139a6da67c
1 changed files with 4 additions and 4 deletions
|
|
@ -18,7 +18,10 @@ manual_steps=()
|
|||
echo -e "\n${CYAN}═══ twozero MCP for TouchDesigner — Setup ═══${NC}\n"
|
||||
|
||||
# ── 1. Check if TouchDesigner is running ──
|
||||
if pgrep -if "TouchDesigner" >/dev/null 2>&1; then
|
||||
# Match on process *name* (not full cmdline) to avoid self-matching shells
|
||||
# that happen to have "TouchDesigner" in their args. macOS and Linux pgrep
|
||||
# both support -x for exact name match.
|
||||
if pgrep -x TouchDesigner >/dev/null 2>&1 || pgrep -x TouchDesignerFTE >/dev/null 2>&1; then
|
||||
echo -e " ${OK} TouchDesigner is running"
|
||||
td_running=true
|
||||
else
|
||||
|
|
@ -66,9 +69,6 @@ if 'twozero_td' not in cfg['mcp_servers']:
|
|||
}
|
||||
with open(cfg_path, 'w') as f:
|
||||
yaml.dump(cfg, f, default_flow_style=False, sort_keys=False)
|
||||
print('added')
|
||||
else:
|
||||
print('exists')
|
||||
" 2>/dev/null && echo -e " ${OK} twozero_td MCP entry added to config" \
|
||||
|| { echo -e " ${FAIL} Could not update config (is PyYAML installed?)"; \
|
||||
manual_steps+=("Add twozero_td MCP entry to ${HERMES_CFG} manually"); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue