vyos@vyos:~$ delete container image 84f7fe4db64b Error: `podman ps` takes no arguments /bin/sh: line 2: 84f7fe4db64b27fdc663001bf5d0fb486939520242b704e79c07135f0fb975f7: command not found
The call to rc_cmd('podman inspect ...') determines whether a container image scheduled for deletion has any ancestor containers still using it. Previously, if the podman command wrote output to stderr, rc_cmd() would return that error
message alongside or instead of the ancestor container ID.
This caused subsequent podman calls to fail, as the error string was incorrectly treated as a valid command argument. This change ensures only valid ancestor IDs are returned.
This is a fix for commit a99ca6d11b5 ("op-mode: T7403: add option for forcefully remove a container image")