The error message when giving an option label, but no values, is incorrect for @Option array properties. For example, with this command:
@main
struct Example: ParsableCommand {
@Option(parsing: .upToNextOption)
var test: [String] = []
mutating func run() throws {
print(test)
}
}
Expected behavior
$ example --test
Error: Missing value for '--test <test>'
Actual behavior
$ example --test
Error: Unknown option '--test'. Did you mean '--test'?
Checklist
ArgumentParser version: main
Swift version: swift-driver version: 1.45.2 Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8)
The error message when giving an option label, but no values, is incorrect for
@Optionarray properties. For example, with this command:Expected behavior
Actual behavior
Checklist
mainbranch of this packageArgumentParser version:
mainSwift version: swift-driver version: 1.45.2 Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8)