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

ArgGroup yaml creation does not allow multiple option #840

Closed
ZoeyR opened this issue Feb 2, 2017 · 0 comments
Closed

ArgGroup yaml creation does not allow multiple option #840

ZoeyR opened this issue Feb 2, 2017 · 0 comments
Assignees
Labels
C-enhancement Category: Raise on the bar on expectations
Milestone

Comments

@ZoeyR
Copy link

ZoeyR commented Feb 2, 2017

Affected Version of clap

2.20.1

Expected Behavior Summary

ArgGroup is created from Yaml

Actual Behavior Summary

Program errors out with
thread 'main' panicked at 'Unknown ArgGroup setting 'multiple' in YAML file for ArgGroup 'io'', C:\Users\<user>\.cargo\registry\src\github.com-1ecc6299db9ec823\clap-2.20.1\src\args\group.rs:493

Steps to Reproduce

create yaml file similar to the following

name: dungeon
version: "0.1.0"
author: Daniel Griffen <daniel@griffen.io>
args:
    - save:
        short: s
        long: save
        value_name: FILE
        min_values: 0
        max_values: 1
    - load:
        short: l
        long: load
        value_name: FILE
        min_values: 0
        max_values: 1
groups:
    - io:
        args: [save, load]
        multiple: true

Try and create matches object with

let yaml = load_yaml!("cli.yml");
let matches = App::from_yaml(yaml).get_matches();
@kbknapp kbknapp added C: arg groups C-enhancement Category: Raise on the bar on expectations labels Feb 3, 2017
@kbknapp kbknapp added this to the 2.20.2 milestone Feb 3, 2017
@kbknapp kbknapp self-assigned this Feb 3, 2017
kbknapp added a commit that referenced this issue Feb 3, 2017
@kbknapp kbknapp closed this as completed in 07d985d Feb 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Raise on the bar on expectations
Projects
None yet
Development

No branches or pull requests

2 participants