Skip to content

lib.xo.xo_cli: don't pass --json argument for 'list-objects' command - #679

Merged
semarie merged 1 commit into
masterfrom
srt/xo-cli-list-objects
Aug 31, 2026
Merged

lib.xo.xo_cli: don't pass --json argument for 'list-objects' command#679
semarie merged 1 commit into
masterfrom
srt/xo-cli-list-objects

Conversation

@semarie

@semarie semarie commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

on xo-cli cli command, --json argument isn't valid on 'list-objects' commands, so avoid to pass it. The output is JSON anyway for this command.

instead, --property is used to filter the property returned.

  xo-cli list-objects [--<property>]… [<property>=<value>]...
    Returns a list of XO objects.

   --<property>
      Restricts displayed properties to those listed.

  xo-cli <command> [--json] [<name>=<value>]...
    Executes a command on the current XO instance.

on xo-cli cli command, --json argument isn't valid on 'list-objects' commands, so avoid to pass it.
The output is JSON anyway for this command.

instead, --property is used to filter the property returned.

```
  xo-cli list-objects [--<property>]… [<property>=<value>]...
    Returns a list of XO objects.

   --<property>
      Restricts displayed properties to those listed.

  xo-cli <command> [--json] [<name>=<value>]...
    Executes a command on the current XO instance.
```

Signed-off-by: Sebastien Rodot <sebastien.rodot@vates.tech>
@semarie semarie self-assigned this Aug 24, 2026
@semarie
semarie requested a review from a team as a code owner August 24, 2026 15:26
@semarie

semarie commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

in the current (faulty) behavior, we are returning [{}] the list of objects, with only the json property if it exists (it usually doesn't, so the object is empty)

list-objects is used in xo_object_exists() method. but as the function returns if the object exists, it was fine before and it is still fine now.

@semarie semarie mentioned this pull request Aug 24, 2026
9 tasks
@semarie
semarie requested a review from a team August 28, 2026 15:47
@semarie
semarie merged commit 99364ae into master Aug 31, 2026
11 checks passed
@semarie
semarie deleted the srt/xo-cli-list-objects branch August 31, 2026 15:23
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.

3 participants