Skip to content

Commit 6d2804d

Browse files
fix(install): proper OpenClaw uninstall-before-reinstall ordering
Reorder OpenClaw operations: uninstall first (while files still exist) to keep config valid, then clean leftover directory, then fresh install. Fixes stale config entries that blocked reinstall.
1 parent f3f33b2 commit 6d2804d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

install.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,12 +348,14 @@ ok "Codex skills linked: ~/.agents/skills/workit"
348348
# OpenClaw integration (optional)
349349
# ---------------------------------------------------------------------------
350350
if command -v openclaw > /dev/null 2>&1; then
351-
# Remove stale install before re-registering
351+
# Uninstall first (while files may still exist) to keep config valid,
352+
# then clean leftover directory, then reinstall fresh.
353+
openclaw plugins uninstall workit --force 2>/dev/null || true
352354
rm -rf "${HOME}/.openclaw/extensions/workit" 2>/dev/null
353355
if openclaw plugins install "$PLUGIN_DIR/" 2>/dev/null; then
354356
ok "OpenClaw plugin registered"
355357
else
356-
warn "OpenClaw detected, but plugin registration failed"
358+
warn "OpenClaw detected, but plugin registration failed (run: openclaw doctor --fix)"
357359
fi
358360
fi
359361

0 commit comments

Comments
 (0)