Skip to content

[Bug]: --quiet --format json behaves inconsistently across list commands #1532

@realrajaryan

Description

@realrajaryan

I have done the following

  • I have searched the existing issues
  • If possible, I've reproduced the issue using the 'main' branch of this project

Steps to reproduce

Use --quiet with JSON output on list commands:

$ container list --all --quiet --format json
[]

$ echo $?
0

$ container image list --quiet --format json
Error: cannot use flag --quiet or --verbose along with --format json

$ echo $?
1

$ container volume list --quiet --format json
[]

$ echo $?
0

$ container network list --quiet --format json
[{"status":{"ipv4Subnet":"192.168.64.0\/24","ipv6Subnet":"fd0d:cb75:2690:18d6::\/64","ipv4Gateway":"192.168.64.1"},"config":{"labels":{"com.apple.container.resource.role":"builtin"},"pluginInfo":{"plugin":"container-network-vmnet","variant":"reserved"},"id":"default","creationDate":800212779.293207,"mode":"nat"},"state":"running","id":"default"}]

$ echo $?
0

Problem description

List commands disagree on whether --quiet can be combined with --format json. The CLI should either reject that combination consistently or ignore --quiet consistently when structured JSON output is requested.

Environment

- OS: macOS 26.4.1 (25E253)
- Xcode: Xcode 26.4.1 (17E202)
- Container: container CLI 0.12.3 (build: release, commit: f989901)

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions