diff --git a/setup.sh b/setup.sh index 2f67ce8..a527033 100755 --- a/setup.sh +++ b/setup.sh @@ -95,7 +95,11 @@ cat "$GROUPS_FILE" # --- install (globally, grouped by source) ------------------------------------- echo "==> Installing skills globally (~/.claude)" -while IFS=$'\t' read -r SOURCE SKILLS; do +# Read plan from fd 3 and redirect npx stdin to /dev/null. The skills CLI reads +# stdin even with --yes; without these guards it would consume the remaining +# lines of GROUPS_FILE and the loop would only run once (silently dropping +# every source after the first). +while IFS=$'\t' read -r SOURCE SKILLS <&3; do [[ -z "$SOURCE" ]] && continue echo "==> $SOURCE :: $SKILLS" # The skills CLI expects --skill repeated per name, not a comma-joined string. @@ -110,8 +114,8 @@ while IFS=$'\t' read -r SOURCE SKILLS; do --agent "$AGENT_TARGET" \ --copy \ --global \ - --yes -done < "$GROUPS_FILE" + --yes < /dev/null +done 3< "$GROUPS_FILE" echo "==> Done. Log: $LOG_FILE" cat <<'EOF'