You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ossie.apache.org by "iamrajatrana (via GitHub)" <gi...@apache.org> on 2026/08/19 20:09:04 UTC

[I] cli: plugin list silently ignores unexpected positional arguments [ossie]

iamrajatrana opened a new issue, #334:
URL: https://github.com/apache/ossie/issues/334

   ### Description
   
   `ossie plugin list` accepts arbitrary positional arguments, silently ignores them, and exits successfully.
   
   ### Steps to reproduce
   
   ```bash
   ossie plugin list unexpected
   echo $?
   ```
   
   ### Actual behavior
   
   ```text
   no plugins installed
   0
   ```
   
   The argument is ignored and the command reports success. Multiple arguments behave the same way.
   
   ### Expected behavior
   
   Because `plugin list` does not accept positional arguments, it should reject them with a non-zero exit status and show command usage, consistent with other CLI commands such as `plugin remove`.
   
   ### Cause
   
   The `listCmd` definition does not set an `Args` validator. Cobra treats a nil validator as accepting arbitrary arguments.
   
   ### Suggested fix
   
   Add `Args: cobra.NoArgs` to `listCmd` and add tests for zero, one, and multiple positional arguments.
   
   ### Environment
   
   - Apache Ossie commit: `88e0011`
   - Go: `go1.26.2 darwin/arm64`
   - OS: macOS arm64


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ossie.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] cli: plugin list silently ignores unexpected positional arguments [ossie]

Posted by "jbonofre (via GitHub)" <gi...@apache.org>.
jbonofre closed issue #334: cli: plugin list silently ignores unexpected positional arguments
URL: https://github.com/apache/ossie/issues/334


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ossie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org