Skip to content

Too many arguments provided for command #12

@spaghettifunk

Description

@spaghettifunk

Describe the bug
The flags seem not be read correctly leading to a Too many arguments provided for command error

To Reproduce
Run e1_simple_cli.zig example to see the error as Error: Too many arguments provided for command 'chilli-app'.

Expected behavior
The --config parameter should be able to process the followed value and still invoke the run command correctly

Additional context
I think the issue lies here

while (arg_iterator.peek()) |arg| {
    if (std.mem.startsWith(u8, arg, "-")) break;  // <-- it stops here when parsing `--config`
    ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions