4.11.1 Executing podman attach --latest causes panic if no containers are available

If you execute podman attach --latest and no containers exist in your environment, a runtime error occurs:

# podman  attach --latest
panic: runtime error: index out of range

Note that as soon as there are containers in the environment, this error no longer occurs. Running the command when there are no containers is meaningless.

(Bug ID 29882537)