Skip to content

Restrict the number of values of "-p" and "-v"#33

Merged
slp merged 2 commits into
libkrun:mainfrom
slp:fix-multiple-args
Aug 16, 2022
Merged

Restrict the number of values of "-p" and "-v"#33
slp merged 2 commits into
libkrun:mainfrom
slp:fix-multiple-args

Conversation

@slp
Copy link
Copy Markdown
Collaborator

@slp slp commented Aug 16, 2022

With clap, "multiple(true)" implies that an argument may appear morethan once, but also that each time can declare multiple values. This behavior clobbers the positional argument IMAGE.

To prevent this, declare a limit of 1 value per occurrence.

With clap, "multiple(true)" implies that an argument may appear more
than once, but also that each time can declare multiple values. This
behavior clobbers the positional argument IMAGE.

To prevent this, declare a limit of 1 value per occurrence.

Fixes: libkrun#32

Signed-off-by: Sergio Lopez <slp@redhat.com>
@slp slp force-pushed the fix-multiple-args branch from b3903f7 to f9f4d4f Compare August 16, 2022 15:54
This version just contains a minor fix in the way arguments are
parsed, bump release number to v0.2.2

Signed-off-by: Sergio Lopez <slp@redhat.com>
@slp slp merged commit e67d0ea into libkrun:main Aug 16, 2022
@slp slp deleted the fix-multiple-args branch August 16, 2022 16:03
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 this pull request may close these issues.

1 participant