insta icon indicating copy to clipboard operation
insta copied to clipboard

cargo-insta: exclude flag doesn't take multiple arguments

Open ajwerner opened this issue 1 year ago • 1 comments

What happened?

I ran my test with multiple exclude flags.

Reproduction steps

cargo insta test --workspace --all-targets --exclude a --exclude b

error: The argument '--exclude <SPEC>' was provided more than once, but cannot be used multiple times

USAGE:
    cargo insta test --all-targets --exclude <SPEC> --test-runner <test-runner> --unreferenced <unreferenced> --workspace

For more information try --help

Insta Version

cargo-insta 1.39.0

rustc Version

No response

What did you expect?

I expected it to behave like cargo test:

--exclude SPEC… Exclude the specified packages. Must be used in conjunction with the --workspace flag. This flag may be specified multiple times and supports common Unix glob patterns like *, ? and []. However, to avoid your shell accidentally expanding glob >patterns before Cargo handles them, you must use single quotes or double quotes around each pattern.

ajwerner avatar Jul 01 '24 19:07 ajwerner

I'll put up a PR for this, just wanted to file it first.

ajwerner avatar Jul 01 '24 19:07 ajwerner