Resolve Windows .cmd and .bat shims in the harness-config audit's server-command check

Aperta Adatta ai principianti
#20,960 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
shell
Ambito
tooling

Direzione di ricerca

Leggi il ramo dei comandi semplici in plugins/harness-config/skills/audit/scripts/audit-engine.sh e i controlli correlati in audit-engine.test.sh; #19808 è citato come precedente in lib/prerequisites.mjs. Aggiungi test che simulino un host Windows e uno shim .cmd, quindi verifica che l’audit segnali command-resolves per questo e continui a segnalare command-missing:<server> quando nessun host risolve il comando.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Context

Item 1 of #20519, split out because #20933 closes #20519 with changes for items 2-5 (item 2 still had three open review regressions at filing) and none for this item. The harness-config audit's C/server-command check resolves a stdio MCP server's bare command with command -v "$cmd" (plugins/harness-config/skills/audit/scripts/audit-engine.sh, the bare-command branch). Git Bash does not resolve .cmd or .bat shims through command -v, so a server launched through a shim (for example dnx, which where.exe resolves to dnx.cmd) is reported command-missing though it starts.

Proposed work

  • In the bare-command branch, on a Windows host ($OSTYPE msys or cygwin), also try command -v "$cmd.cmd", "$cmd.bat" and "$cmd.exe" (or where.exe) before reporting command-missing. Precedent: #19808 made lib/prerequisites.mjs probe the same way.
  • Keep the Linux and macOS paths unchanged.

Acceptance criteria

  • On a Windows host, a stdio MCP server whose command resolves only as <name>.cmd on PATH yields command-resolves, covered by a test in audit-engine.test.sh that fakes the shim and the host type.
  • A bare command that resolves on no host still yields command-missing:<server>.

Refs: #20519, #20933

🤖 Generated with Claude Code

Lingua principale
Shell
Stelle
22
Fork
2
Merge medio
3h 4m
PR unite (30g)
941

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di melodic-software/claude-code-plugins

Tutte le issue di melodic-software/claude-code-plugins

Issue simili

Altre issue su Shell/Bash

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.