TheBevyFlock / bevy_cli

A Bevy CLI tool and linter.
https://thebevyflock.github.io/bevy_cli/
Apache License 2.0
52 stars 7 forks source link

Handle empty iterator for `ArgBuilder::add_value_list` #115

Closed TimJentzsch closed 2 months ago

TimJentzsch commented 2 months ago

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 https://github.com/TheBevyFlock/bevy_cli/pull/102#discussion_r1779003612_

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