Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redact_arg_values throws a parse error on Options of type Vec #111

Closed
BobEvans opened this issue Dec 7, 2021 · 0 comments · Fixed by #112
Closed

redact_arg_values throws a parse error on Options of type Vec #111

BobEvans opened this issue Dec 7, 2021 · 0 comments · Fixed by #112

Comments

@BobEvans
Copy link

BobEvans commented Dec 7, 2021

In Fuchsia's ffx tool, there is a declaration of an Option type, --config that can be a Vec.
from_args has no problem with invocations such as

ffx --config x --config y

However, redact_arg_values throws a parse error in ParseSlotValue that a duplicate value, y, was provided. It seems to be mistaking the Option type for a variant that has one value.

This is preventing the majority of analytics use cases from working for ffx.

erickt added a commit to erickt/argh that referenced this issue Dec 7, 2021
This changes argh_derive to handle redacting types like:

```
struct Cmd {
    #[argh(option)]
    /// fooey
    arg: Vec<String>,
}
```

Fixes google#111
erickt added a commit to erickt/argh that referenced this issue Dec 7, 2021
This changes argh_derive to handle redacting types like:

```
struct Cmd {
    #[argh(option)]
    /// fooey
    arg: Vec<String>,
}
```

Fixes google#111
erickt added a commit that referenced this issue Dec 8, 2021
This changes argh_derive to handle redacting types like:

```
struct Cmd {
    #[argh(option)]
    /// fooey
    arg: Vec<String>,
}
```

Fixes #111
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant