Skip to content

Regression: Fail always on mandatory #220

@fpellet

Description

@fpellet

Description

A regression appeared with #127
I don't understand why this has been merged, as the pull request clearly states that it doesn't work.

Repro steps

This test fails when it should.
In fact, if we accept the missing values, it turns green. This indicates that the arguments are good.

    [<Fact>]
    let ``Main command parsing should allow sub command if not missing mandatory parameter`` () =
        let args = [|"--mandatory-arg" ; "true" ; "checkout"; "--branch"; "origin"  |]
        let results = parser.ParseCommandLine(args)
        let nested = results.GetResult <@ Checkout @>
        test <@ nested.GetResults <@ Branch @> = ["origin"] @>

Expected behavior

Failed only when a value is missing, and not all the time.

Actual behavior

Fails all the time, even when it's worthless

Known workarounds

😞

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions