Skip to content

Arity not working #930

Closed
Closed
@Chris08tm

Description

@Chris08tm

I have the method:

 @Command(command = "create")
    public String create(
            @Option(
                    longNames = {"fp", "filePath"},
                    arity = OptionArity.EXACTLY_ONE,
                    required = true) String filePath){
        return "test";
    }

But after running the command

shell:>c --fp
Not enough arguments for option 'fp', requires at least '0'

I have tried using arityMin = 1 and arityMax = 1, but regardless it always says " requires at least '0' "
I am using 'springShellVersion' = "3.1.5"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions