Description
The replication log command advertises support for positional EXECUTION_ID and TASK_ID arguments, but the command currently rejects them due to incorrect Cobra argument validation.
This change updates the command to properly accept and validate up to two positional arguments, matching the documented CLI behavior.
Steps to Reproduce
- Run command:
harbor replication log 123 456
- Observe error:
Error: accepts at most 0 arg(s), received
Expected Behavior
The command should accept positional EXECUTION_ID and TASK_ID arguments as documented.
Actual Behavior
Cobra argument validation rejects positional arguments before the command execution flow runs.
Environment
- OS: macOS / Darwin arm64
- Tool version: Harbor CLI current main branch
- Go version: go1.26.2 darwin/arm64
Additional Context
The command usage and generated docs currently advertise:
harbor replication log [EXECUTION_ID] [TASK_ID]. However, the command was configured with: Args: cobra.MaximumNArgs(0) which prevents positional arguments from being used at runtime.
Description
The replication log command advertises support for positional EXECUTION_ID and TASK_ID arguments, but the command currently rejects them due to incorrect Cobra argument validation.
This change updates the command to properly accept and validate up to two positional arguments, matching the documented CLI behavior.
Steps to Reproduce
harbor replication log 123 456Error: accepts at most 0 arg(s), receivedExpected Behavior
The command should accept positional EXECUTION_ID and TASK_ID arguments as documented.
Actual Behavior
Cobra argument validation rejects positional arguments before the command execution flow runs.
Environment
Additional Context
The command usage and generated docs currently advertise:
harbor replication log [EXECUTION_ID] [TASK_ID]. However, the command was configured with: Args: cobra.MaximumNArgs(0) which prevents positional arguments from being used at runtime.