You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: container clean --help shows container IDs as optional, but clean without IDs fails #2523
If possible, I've reproduced the issue using the 'main' branch of this project
Steps to reproduce
% container clean --helpOVERVIEW: Clean one or more running containersUSAGE: container clean [--debug] [<container-ids> ...]ARGUMENTS: <container-ids> Container IDs...
% container cleanError: no containers specified
% echo$?1
Problem description
The usage line shows the container IDs as optional, but clean fails without them. Unlike stop, kill and delete, clean has no --all flag, so there is no case where the IDs can be omitted. docs/command-reference.md already lists them as required.
I'd expect the usage line to show the IDs as required and a missing ID to be reported as a usage error, as container inspect does. That changes the exit code for this case from 1 to 64.
I opened #2500 with that change before filing this issue, so the behavior can be agreed here. If you'd rather add clean --all to match stop, kill and delete, I can change the PR. This is one case of the zero-argument handling in #646.
Environment
- OS: macOS 27.2 (26B123)
- Xcode: Version 27.2 (27B52)
- Container: main (c05a560)
Activity