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

Handle empty iterator for ArgBuilder::add_value_list #115

Closed
TimJentzsch opened this issue Sep 28, 2024 · 0 comments · Fixed by #116
Closed

Handle empty iterator for ArgBuilder::add_value_list #115

TimJentzsch opened this issue Sep 28, 2024 · 0 comments · Fixed by #116
Labels
A-CLI Related to the main CLI and not a more specific subcommand C-Bug A bug in the program

Comments

@TimJentzsch
Copy link
Collaborator

TimJentzsch commented Sep 28, 2024

Somewhat unrelated, but I saw the following code in CargoFeatureArgs::args_builder():

.add_value_list("--features", self.features.clone())

What happens if self.features is empty? Will it still pass --features to Cargo?

Originally posted by @BD103 in #102 (comment)

We should add a check if the value list is empty and only add the flag if it's not.

@TimJentzsch TimJentzsch added the C-Bug A bug in the program label Sep 28, 2024
@BD103 BD103 added the A-CLI Related to the main CLI and not a more specific subcommand label Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CLI Related to the main CLI and not a more specific subcommand C-Bug A bug in the program
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants