Skip to content

Conversation

@neunenak
Copy link

I was seeing the following issue when trying to deploy a subset of targets defined in my flake:

❯ deploy --targets ".#flake-one" ".#flake-two"
error: the argument '--targets <TARGETS>' cannot be used with '[TARGET]'

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

The problem turned out to be a result of the way the clap macro was defining the targets command line argument - it was interpreting the last argument to --targets as being the position argument, and then treating them as two incompatible uses of commands from the same argument grup.

Adding num_args... fixes this behavior.

I was seeing the following issue when trying to deploy a subset of
targets defined in my flake:

```
❯ deploy --targets ".#flake-one" ".#flake-two"
error: the argument '--targets <TARGETS>' cannot be used with '[TARGET]'

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

The problem turned out to be a result of the way the clap macro was
defining the `targets` command line argument - it was interpreting
the last argument to --targets as being the <target> position argument,
and then treating them as two incompatible uses of commands from the
same argument grup.

Adding `num_args...` fixes this behavior.
@neunenak
Copy link
Author

Closing, I didnt realize #341 fixes the same issue

@neunenak neunenak closed this Nov 25, 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

Development

Successfully merging this pull request may close these issues.

1 participant