Unexpected argument when using `swift package plugin generate-manual <tool>`

Aperta
#652 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
swift
Ambito
cli

Direzione di ricerca

Inizia dal punto di ingresso del plugin Swift Package generate-manual e riproduci il comando swift package plugin generate-manual tuist --configuration debug utilizzando le versioni riportate di Swift e ArgumentParser. Confronta l’argomento <tool> dichiarato con gli argomenti passati al plugin e verifica la correzione confermando che il comando venga completato senza l’errore di argomento imprevisto.

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

Descrizione

I'm trying to use the generate-manual plugin in this repository by using the following command: swift package plugin generate-manual tuist --configuration debug. However, the command fails with an error Error: Unexpected argument 'tuist'. It seems that the argument parsing logic is unable to recognize the tool argument, even though it's defined in it and shows up in the help menu.

ArgumentParser version: 1.4.0
Swift version:

swift-driver version: 1.90.11.1 Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
Target: arm64-apple-macosx14.0
Checklist
  • If possible, I've reproduced the issue using the main branch of this package (commit: bb10ca8b70fe54c67a1b3adb0f5d58341dc2ed7b)
  • I've searched for existing GitHub issues
Steps to Reproduce

Clone the this repository and run the command swift package plugin generate-manual tuist --configuration debug.

Expected behavior

I'd expect the command to complete successfully.

Actual behavior

You get the following error:

Built package in debug mode
Generating manual for tuist...
Error: Unexpected argument 'tuist'
Usage: generate-manual <tool> [--multi-page] [--date <date>] [--section <section>] [--authors <authors> ...] --output-directory <output-directory>
  See 'generate-manual --help' for more information.
error: 'generate-manual' invocation failed: ''generate-manual' invocation failed with a nonzero exit code: '64'.'
Lingua principale
Swift
Stelle
3.8k
Fork
436
Merge medio
4g 11h
PR unite (30g)
2

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 apple/swift-argument-parser

Tutte le issue di apple/swift-argument-parser

Issue simili

Altre issue su Swift

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.