Skip to content

a6b0cb2c5e1c1efea2d48fdf7bb5b36b6675e40e broke --targets #325

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

Open
cmm opened this issue Jun 5, 2025 · 2 comments · May be fixed by #327
Open

a6b0cb2c5e1c1efea2d48fdf7bb5b36b6675e40e broke --targets #325

cmm opened this issue Jun 5, 2025 · 2 comments · May be fixed by #327

Comments

@cmm
Copy link

cmm commented Jun 5, 2025

Single argument to --targets is still fine, but multiple targets are not. Now when you say deploy --targets .#{host-a,host-b}.system you get:

error: the argument '--targets <TARGETS>' cannot be used with '[TARGET]'

Usage: deploy --targets <TARGETS> [TARGET] <EXTRA_BUILD_ARGS>...

The commit in question "just" updates deps, perhaps the Clap major-version bump is the problem?

@weriomat
Copy link
Contributor

weriomat commented Jun 6, 2025

Hey, this seems like an upstream problem, see

weriomat added a commit to weriomat/deploy-rs that referenced this issue Jun 6, 2025
This fixes [325](serokell#325) by
manually merging `targets` with `target` if needed.
It might be related to this
[upstream](clap-rs/clap#5115) issue.
weriomat added a commit to weriomat/deploy-rs that referenced this issue Jun 6, 2025
This fixes [325](serokell#325) by
manually merging `targets` with `target` if needed.
It might be related to this
[upstream](clap-rs/clap#5115) issue.
weriomat added a commit to weriomat/deploy-rs that referenced this issue Jun 6, 2025
This fixes [325](serokell#325) by
manually merging `targets` with `target` if needed.
It might be related to this
[upstream](clap-rs/clap#5115) issue.
@VolodiaPG
Copy link

VolodiaPG commented Jun 6, 2025

Hey, a fix might be in cli.rs to add num_args = 1.. (https://docs.rs/clap/latest/clap/struct.Arg.html#method.num_args I think)

 /// A list of flakes to deploy alternatively
    #[arg(long, group = "deploy", num_args = 1..)]
    targets: Option<Vec<String>>,

It then works (https://github.com/VolodiaPG/deploy-rs)

weriomat added a commit to weriomat/deploy-rs that referenced this issue Jun 6, 2025
This fixes [325](serokell#325) by
manually merging `targets` with `target` if needed.
It might be related to this
[upstream](clap-rs/clap#5115) issue.
VolodiaPG added a commit to VolodiaPG/deploy-rs that referenced this issue Jun 6, 2025
SebastianStork added a commit to SebastianStork/nixos-config that referenced this issue Jun 13, 2025
weriomat pushed a commit to weriomat/deploy-rs that referenced this issue Jun 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants