Jelajahi Sumber

corrected install-plugins

bchanot 1 bulan lalu
induk
melakukan
6340a243ed
2 mengubah file dengan 21 tambahan dan 5 penghapusan
  1. 10 0
      README.md
  2. 11 5
      install-plugins.sh

+ 10 - 0
README.md

@@ -701,6 +701,16 @@ Symlinks are broken. `cd` into your config repo and run `bash link.sh`, then ver
 Run `bash link.sh` and verify: `ls -la ~/.claude/skills/gstack`.
 If missing: `cd` into your config repo and run `git submodule update --init`.
 
+### GStack submodule "directory not found after init"
+The submodule is not registered in `.gitmodules` (never added). Fix:
+```bash
+cd ~/Documents/claude   # chemin de ton config repo
+git submodule add https://github.com/garrytan/gstack skills-external/gstack
+git submodule update --init --recursive
+bash link.sh
+git add .gitmodules skills-external/gstack && git commit -m "chore: add gstack submodule"
+```
+
 ### link.sh warns "is a real directory"
 If `~/.claude/agents/`, `~/.claude/skills/`, `~/.claude/lib/`, or `~/.claude/templates/` exist as real
 directories, the script skips them to avoid data loss. Rename or remove the directory, then re-run `link.sh`.

+ 11 - 5
install-plugins.sh

@@ -94,10 +94,10 @@ fi
 NODE_OK=false
 if command -v node &>/dev/null; then
   NODE_VER=$(node --version | sed 's/v//' | cut -d. -f1)
-  if [ "$NODE_VER" -ge 18 ]; then
+  if [ "$NODE_VER" -ge 22 ]; then
     ok "Node.js $(node --version)"; NODE_OK=true
   else
-    warn "Node.js $(node --version) is too old (need >=18)"
+    warn "Node.js $(node --version) is too old (need >=22 — GSD v2 requires it)"
   fi
 fi
 if [ "$NODE_OK" = false ]; then
@@ -298,10 +298,16 @@ echo ""
 install_plugin() {
   local name="$1"
   local source="$2"
+  if claude plugin list 2>/dev/null | grep -qi "^\s*$name"; then
+    ok "$name (already installed)"
+    return
+  fi
   info "Installing $name..."
-  claude plugin install --scope user "$name@$source" 2>/dev/null \
-    && ok "$name" \
-    || warn "$name — skipped (already installed or failed)"
+  if claude plugin install --scope user "$name@$source" 2>/dev/null; then
+    ok "$name"
+  else
+    err "$name — FAILED (run manually: claude plugin install --scope user $name@$source)"
+  fi
 }
 
 # Official Anthropic (always on)