Files
Paul Holzinger 4b3890ccac remote: fix incorrect CONTAINER_CONNECTION parsing
When a user specifies a invalid connection in CONTAINER_CONNECTION then
podman should return a proper error saying so. Currently it ignored the
error and in rootFlags() just exited early with defining any flags. This
caused a panic then when trying to use the flags later.

In order to address this first store the connection error in the
PodmanConfig struct and not abort right away during flag setup. This is
important as the user might have specified a flag with a valid remote
connection. As such we check all flags and only when none were given we
return the connection error.

Also while at it I noticed that the default connection reported via
podman --help was wrong as it only used the old containers.conf field
for it and did not consider the podman-connections.json default.

New regression tests have been added to make sure it behaves correctly.

This fixes the problem reported in the PR #22997.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-06-21 14:01:22 +02:00
..
2024-02-08 09:35:39 -05:00
2022-12-15 13:39:56 +01:00
2024-02-08 09:35:39 -05:00
2023-02-11 18:23:24 +01:00
2024-04-24 12:07:38 +08:00
2024-02-08 09:35:39 -05:00
2024-02-08 09:35:39 -05:00
2024-02-08 09:35:39 -05:00
2024-02-08 09:35:39 -05:00
2024-05-27 11:19:03 +02:00