apple / swift-argument-parser

Straightforward, type-safe argument parsing for Swift
Apache License 2.0
3.3k stars 311 forks source link

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

Open pepicrft opened 1 month ago

pepicrft commented 1 month ago

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

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'.'